Beispiel #1
0
    def test_stop(self):

        pred = ZookeeperGoodUntilTime("test", {}, None, "/path", None,
                                      interval=self.interval)
        self.mox.StubOutWithMock(pred, "_watch_node")
        pred._watch_node()

        self.mox.ReplayAll() 

        pred.start()
        pred.stop()
        pred.stop()
        pred.stop()

        self.mox.VerifyAll() 
Beispiel #2
0
    def test_start(self):

        pred = ZookeeperGoodUntilTime("test", {}, None, "/path", None,
                                      interval=self.interval)
        self.mox.StubOutWithMock(pred, "_watch_node")
        pred._watch_node()

        self.mox.ReplayAll() 

        print "This test should complete quickly"
        pred.start()
        pred.start()  # should noop
        pred.start()  # should noop
        pred.stop()

        self.mox.VerifyAll() 
Beispiel #3
0
    def test_stop(self):

        pred = ZookeeperGoodUntilTime("test", {},
                                      None,
                                      "/path",
                                      None,
                                      interval=self.interval)
        self.mox.StubOutWithMock(pred, "_watch_node")
        pred._watch_node()

        self.mox.ReplayAll()

        pred.start()
        pred.stop()
        pred.stop()
        pred.stop()

        self.mox.VerifyAll()
Beispiel #4
0
    def test_start(self):

        pred = ZookeeperGoodUntilTime("test", {},
                                      None,
                                      "/path",
                                      None,
                                      interval=self.interval)
        self.mox.StubOutWithMock(pred, "_watch_node")
        pred._watch_node()

        self.mox.ReplayAll()

        print "This test should complete quickly"
        pred.start()
        pred.start()  # should noop
        pred.start()  # should noop
        pred.stop()

        self.mox.VerifyAll()