mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-03 21:32:33 +00:00
feat(tests): sync received responses
to prevent "unexpected response to Initialize" errors
This commit is contained in:
parent
eafa276d42
commit
12a59b88a5
@ -231,6 +231,7 @@ def client(
|
|||||||
_raw_client.reset_debug_features()
|
_raw_client.reset_debug_features()
|
||||||
_raw_client.open()
|
_raw_client.open()
|
||||||
try:
|
try:
|
||||||
|
_raw_client.sync_responses()
|
||||||
_raw_client.init_device()
|
_raw_client.init_device()
|
||||||
except Exception:
|
except Exception:
|
||||||
request.session.shouldstop = "Failed to communicate with Trezor"
|
request.session.shouldstop = "Failed to communicate with Trezor"
|
||||||
|
@ -61,6 +61,7 @@ def screen_recording(
|
|||||||
yield
|
yield
|
||||||
finally:
|
finally:
|
||||||
client.ensure_open()
|
client.ensure_open()
|
||||||
|
client.sync_responses()
|
||||||
# Wait for response to Initialize, which gives the emulator time to catch up
|
# Wait for response to Initialize, which gives the emulator time to catch up
|
||||||
# and redraw the homescreen. Otherwise there's a race condition between that
|
# and redraw the homescreen. Otherwise there's a race condition between that
|
||||||
# and stopping recording.
|
# and stopping recording.
|
||||||
|
Loading…
Reference in New Issue
Block a user