Merge "Fix retry accounting off-by-one bug" into feature/zuulv3

This commit is contained in:
Jenkins 2016-12-15 12:49:34 +00:00 committed by Gerrit Code Review
commit 68fd340802
2 changed files with 3 additions and 3 deletions

View File

@ -4552,7 +4552,7 @@ For CI problems and help debugging, contact ci@example.org"""
self.launch_server.release('.*-test*')
self.waitUntilSettled()
for x in range(2):
for x in range(3):
self.assertEqual(len(self.builds), 1,
'len of builds at x=%d is wrong' % x)
self.builds[0].requeue = True
@ -4562,7 +4562,7 @@ For CI problems and help debugging, contact ci@example.org"""
self.launch_server.hold_jobs_in_build = False
self.launch_server.release()
self.waitUntilSettled()
self.assertEqual(len(self.history), 5)
self.assertEqual(len(self.history), 6)
self.assertEqual(self.countJobResults(self.history, 'SUCCESS'), 2)
self.assertEqual(A.reported, 1)
self.assertIn('RETRY_LIMIT', A.messages[0])

View File

@ -666,7 +666,7 @@ class BuildSet(object):
def addBuild(self, build):
self.builds[build.job.name] = build
if build.job.name not in self.tries:
self.tries[build.job.name] = 1
self.tries[build.job.name] = 0
build.build_set = self
def removeBuild(self, build):