1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 15:38:11 +00:00

python/emulator: increase tolerances

This should help in CI where things can sometimes take a long time.
This commit is contained in:
matejcik 2020-02-11 12:26:51 +01:00
parent a375460afc
commit 1ebaaa7e77

View File

@ -84,7 +84,7 @@ class Emulator:
def _get_transport(self): def _get_transport(self):
return UdpTransport("127.0.0.1:{}".format(self.port)) return UdpTransport("127.0.0.1:{}".format(self.port))
def wait_until_ready(self, timeout=30): def wait_until_ready(self, timeout=60):
transport = self._get_transport() transport = self._get_transport()
transport.open() transport.open()
start = time.monotonic() start = time.monotonic()
@ -138,7 +138,7 @@ class Emulator:
try: try:
self.wait_until_ready() self.wait_until_ready()
except TimeoutError: except TimeoutError:
# Assuming that after the default 30-second timeout, the process is stuck # Assuming that after the default 60-second timeout, the process is stuck
self.process.kill() self.process.kill()
raise raise
@ -158,7 +158,7 @@ class Emulator:
if self.process: if self.process:
self.process.terminate() self.process.terminate()
try: try:
self.process.wait(1) self.process.wait(30)
except subprocess.TimeoutExpired: except subprocess.TimeoutExpired:
self.process.kill() self.process.kill()