Did I find the right examples for you? yes no

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

src/t/w/twisted-lock-HEAD/lock/test/test_paxos.py   twisted-lock(Download)
from ..paxos import Paxos, PrepareTimeout, AcceptTimeout
from ..utils import wait_calls
from . import TestCase as BaseTestCase, seed
    def wait_delayed_calls(self):
        return wait_calls(
            lambda: all(
                (c is None or c.cancelled or c.called)
                for c in chain(
        # Waiting when paxos on node 1 will learn the new value
        yield wait_calls(lambda: self.net.transports[1].log == [(1, 'blah')])
        b = yield self.net.transports[1].paxos.propose('minor')

src/t/w/twisted-lock-HEAD/lock/test/test_lock.py   twisted-lock(Download)
from ..lock import LockFactory, LockProtocol, Syncronizer
from ..config import Config
from ..utils import wait_calls
from .import TestCase as BaseTestCase, seed, get_body
        # old master still does not know about the new master
        # because it received it's state as a snapshot
        yield wait_calls(lambda: self.s1.master is not None)
        self.assertEqual(9005, self.s1.master.http[1])