From 7294438329093035ce3cdbfdf9a90b9bc94250c3 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Wed, 1 Feb 2023 08:01:54 +0100 Subject: [PATCH] sntp/test: Fixed flaky example test From SNTP update in a71fa821, the example test uses notification event (before it simply polled the state in 2 seconds interval). With this change it is possible that the time gets synchronized before retrying, i.e. printing "Waiting for system time to be set... (2/15)". (it was theoretically possible also before this change, but practically never happened) --- examples/protocols/sntp/pytest_sntp.py | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/protocols/sntp/pytest_sntp.py b/examples/protocols/sntp/pytest_sntp.py index a32eed3c72..6191fd7ae7 100644 --- a/examples/protocols/sntp/pytest_sntp.py +++ b/examples/protocols/sntp/pytest_sntp.py @@ -23,7 +23,6 @@ def test_get_time_from_sntp_server(dut: Dut) -> None: dut.expect('IPv4 address:') dut.expect('Initializing and starting SNTP') - dut.expect(r'Waiting for system time to be set... \(\d+/\d+\)') dut.expect('Notification of a time synchronization event') TIME_FORMAT = '%a %b %d %H:%M:%S %Y'