Skip to content

Commit

Permalink
remove bogus tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin J. Mitchell committed Jan 12, 2010
1 parent 7488e4c commit 5324c45
Showing 1 changed file with 0 additions and 60 deletions.
60 changes: 0 additions & 60 deletions buildbot/test/test_locks.py
Expand Up @@ -420,27 +420,6 @@ def _testLock1_1(self, res):
[("start", 1), ("done", 1),
("start", 2), ("done", 2)])

def dont_testLock1a(self): ## disabled -- test itself is buggy
# just like testLock1, but we reload the config file first, with a
# change that causes full1b to be changed. This tickles a design bug
# in which full1a and full1b wind up with distinct Lock instances.
d = self.master.loadConfig(config_1a)
d.addCallback(self._testLock1a_1)
return d
def _testLock1a_1(self, res):
self.control.getBuilder("full1a").requestBuild(self.req1)
self.control.getBuilder("full1b").requestBuild(self.req2)
d = defer.DeferredList([self.req1.waitUntilFinished(),
self.req2.waitUntilFinished()])
d.addCallback(self._testLock1a_2)
return d

def _testLock1a_2(self, res):
# full1a should complete its step before full1b starts it
self.failUnlessEqual(self.events,
[("start", 1), ("done", 1),
("start", 2), ("done", 2)])

def testLock2(self):
# two builds run on separate slaves with slave-scoped locks should
# not interfere
Expand All @@ -457,45 +436,6 @@ def _testLock2_1(self, res):
self.failUnless(self.events[:2] == [("start", 1), ("start", 2)] or
self.events[:2] == [("start", 2), ("start", 1)])

def dont_testLock3(self): ## disabled -- test fails sporadically
# two builds run on separate slaves with master-scoped locks should
# not overlap
self.control.getBuilder("full1c").requestBuild(self.req1)
self.control.getBuilder("full2b").requestBuild(self.req2)
d = defer.DeferredList([self.req1.waitUntilFinished(),
self.req2.waitUntilFinished()])
d.addCallback(self._testLock3_1)
return d

def _testLock3_1(self, res):
# full2b should not start until after full1c finishes. The builds run
# on different slaves, so we can't really predict which will start
# first. The important thing is that they don't overlap.
self.failUnless(self.events == [("start", 1), ("done", 1),
("start", 2), ("done", 2)]
or self.events == [("start", 2), ("done", 2),
("start", 1), ("done", 1)]
)

# This test has been disabled due to flakeyness/intermittentness
# def testLock4(self):
# self.control.getBuilder("full1a").requestBuild(self.req1)
# self.control.getBuilder("full1c").requestBuild(self.req2)
# self.control.getBuilder("full1d").requestBuild(self.req3)
# d = defer.DeferredList([self.req1.waitUntilFinished(),
# self.req2.waitUntilFinished(),
# self.req3.waitUntilFinished()])
# d.addCallback(self._testLock4_1)
# return d
#
# def _testLock4_1(self, res):
# # full1a starts, then full1d starts (because they do not interfere).
# # Once both are done, full1c can run.
# self.failUnlessEqual(self.events,
# [("start", 1), ("start", 3),
# ("done", 1), ("done", 3),
# ("start", 2), ("done", 2)])

class BuilderLocks(RunMixin, unittest.TestCase):
config = """\
from buildbot import locks
Expand Down

0 comments on commit 5324c45

Please sign in to comment.