Skip to content

Commit

Permalink
Increase test timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jcapona committed Dec 7, 2022
1 parent a1fe0a7 commit bc36a83
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_ptdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,19 @@ def callback_with_args():
)
client.start_listening()

assert callback_without_args.counter == 0
assert callback_with_args.counter == 0

# Emit message that emits events without arguments
self.socket_mock.recv_string.return_value = f"{Message.PUB_LOW_BATTERY_WARNING}"
wait_until(lambda: callback_without_args.counter > 0, timeout=3)
wait_until(lambda: callback_without_args.counter > 0, timeout=20)
assert callback_with_args.counter == 0

# Emit message that emits events with 1 argument
self.socket_mock.recv_string.return_value = (
f"{Message.PUB_BRIGHTNESS_CHANGED}|1"
)
wait_until(lambda: callback_with_args.counter > 0, timeout=3)
wait_until(lambda: callback_with_args.counter > 0, timeout=20)

client.stop_listening()

Expand Down

0 comments on commit bc36a83

Please sign in to comment.