1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-17 11:58:13 +00:00

fix(tests): do not trip deadlock detection in autolock test

This commit is contained in:
matejcik 2024-09-19 13:16:59 +02:00 committed by matejcik
parent b6b827cf7b
commit 73c8149528

View File

@ -182,12 +182,17 @@ def test_autolock_does_not_interrupt_signing(device_handler: "BackgroundDeviceHa
with device_handler.client: with device_handler.client:
device_handler.client.set_filter(messages.TxAck, sleepy_filter) device_handler.client.set_filter(messages.TxAck, sleepy_filter)
# confirm transaction # confirm transaction
# In all cases we set wait=False to avoid waiting for the screen and triggering
# the layout deadlock detection. In reality there is no deadlock but the
# `sleepy_filter` delays the response by 10 secs while the layout deadlock
# timeout is 3. In this test we don't need the result of the input event so
# waiting for it is not necessary.
if debug.layout_type is LayoutType.TT: if debug.layout_type is LayoutType.TT:
debug.click(buttons.OK) debug.click(buttons.OK, wait=False)
elif debug.layout_type is LayoutType.Mercury: elif debug.layout_type is LayoutType.Mercury:
debug.click(buttons.TAP_TO_CONFIRM) debug.click(buttons.TAP_TO_CONFIRM, wait=False)
elif debug.layout_type is LayoutType.TR: elif debug.layout_type is LayoutType.TR:
debug.press_middle() debug.press_middle(wait=False)
signatures, tx = device_handler.result() signatures, tx = device_handler.result()
assert len(signatures) == 1 assert len(signatures) == 1