def _check2(ign): self.failUnlessEqual(len(success_events), 1) self.failUnlessEqual(len(finished_events), 0) self.failUnlessEqual(success_events[0].isFinished(), False) self.failUnlessEqual(success_events[0].getResults(), None) db.retire_buildrequests([brids["bn2"]], SUCCESS) return flushEventualQueue()
def _check3(ign): self.failUnlessEqual(len(success_events), 1) self.failUnlessEqual(len(finished_events), 1) self.failUnlessIdentical(bss.__class__, success_events[0].__class__) self.failUnlessEqual(success_events[0].isFinished(), True) self.failUnlessEqual(success_events[0].getResults(), FAILURE) self.failUnlessEqual(finished_events[0].getResults(), FAILURE) return flushEventualQueue()
def wait_until_idle(self, ign=None): done_d = defer.Deferred() d = flushEventualQueue() def _check(ign): if (not self.master.db.has_pending_operations() and self.master.botmaster.loop.is_quiet() and self.master.scheduler_manager.is_quiet() ): done_d.callback(None) return d2 = defer.Deferred() d2.addCallback(flushEventualQueue) d2.addCallback(_check) reactor.callLater(0.01, d2.callback, None) d.addCallback(_check) return done_d
def _then(ign): cm = m.change_svc c = changes.Change("bob", ["Makefile", "foo/bar.c"], "changed stuff") cm.addChange(c) return flushEventualQueue()
def _check1(ign): self.failUnlessEqual(len(success_events), 0) self.failUnlessEqual(len(finished_events), 0) db.retire_buildrequests([brids["bn1"]], FAILURE) return flushEventualQueue()