diff options
Diffstat (limited to 'test/fixtures.py')
-rw-r--r-- | test/fixtures.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/test/fixtures.py b/test/fixtures.py index 90d01f1..4231452 100644 --- a/test/fixtures.py +++ b/test/fixtures.py @@ -126,8 +126,11 @@ class ZookeeperFixture(Fixture): # Party! self.out("Starting...") - self.child.start() - self.child.wait_for(r"binding to port") + while True: + self.child.start() + if self.child.wait_for(r"binding to port", timeout=5): + break + self.child.stop() self.out("Done!") def close(self): @@ -222,8 +225,11 @@ class KafkaFixture(Fixture): self.out("Done!") self.out("Starting...") - self.child.start() - self.child.wait_for(r"\[Kafka Server %d\], Started" % self.broker_id) + while True: + self.child.start() + if self.child.wait_for(r"\[Kafka Server %d\], Started" % self.broker_id, timeout=5): + break + self.child.stop() self.out("Done!") self.running = True |