mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-18 21:48:13 +00:00
fix(tests): mark flaky busy_expiry test
This commit is contained in:
parent
8c0e904b43
commit
bac453ddca
@ -52,14 +52,13 @@ def test_busy_state(client: Client):
|
|||||||
assert client.features.busy is False
|
assert client.features.busy is False
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.flaky(max_runs=5)
|
||||||
def test_busy_expiry(client: Client):
|
def test_busy_expiry(client: Client):
|
||||||
expiry_ms = 100 # 100 milliseconds
|
|
||||||
|
|
||||||
# Show the busy dialog.
|
# Show the busy dialog.
|
||||||
device.set_busy(client, expiry_ms=expiry_ms)
|
device.set_busy(client, expiry_ms=100)
|
||||||
|
|
||||||
# Wait for it to expire.
|
# Wait for it to expire. Add 100ms tolerance to account for CI slowness.
|
||||||
time.sleep(expiry_ms / 1000)
|
time.sleep(0.2)
|
||||||
|
|
||||||
# Check that the device is no longer busy.
|
# Check that the device is no longer busy.
|
||||||
client.refresh_features()
|
client.refresh_features()
|
||||||
|
Loading…
Reference in New Issue
Block a user