test: drop the default timeouts to 2

There's no need to wait any longer.
This commit is contained in:
Peter Hutterer 2023-04-05 14:01:06 +10:00
parent a438e46e18
commit 0aa8bab9c0

View file

@ -174,7 +174,7 @@ class Ei:
self.send(setup.Finish())
self.dispatch()
def wait_for_seat(self, timeout=5) -> bool:
def wait_for_seat(self, timeout=2) -> bool:
def seat_is_done():
return self.seats and [
call for call in self.seats[0].calllog if call.name == "Done"
@ -182,10 +182,10 @@ class Ei:
return self.wait_for(seat_is_done, timeout)
def wait_for_connection(self, timeout=5) -> bool:
def wait_for_connection(self, timeout=2) -> bool:
return self.wait_for(lambda: self.connection is not None, timeout)
def wait_for(self, callable, timeout=5) -> bool:
def wait_for(self, callable, timeout=2) -> bool:
expire = time.time() + timeout
while not callable():
self.dispatch()