Test fails after updating the Jenkins core (from 1.532.1 to 1.580.3). The assert that fails is one that checks the branch name of a build action. Disabling that assert causes the rest of the job to run fine and pass. Might not be an actual failure, but it's still an unwanted peculiarity. I added (cleaned up) console outputs of both jobs. The biggest difference that jumps out is the fact that in the newer version, the first fetch only finds two branches, where the previous version found three.
1.532.1 (1.5 KB)
1.580.3 (1.9 KB)
This issue isn't a current problem as we haven't changed the Jenkins core dependency but it will be soon.