From 8070e7ca6d85ab97e3772894d3b0378b80c59b41 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Wed, 30 Oct 2024 11:17:14 +0200 Subject: [PATCH] tests: net: conn_mgr_monitor: Increase the sleep between states The short sleep (10ms) was not enough any more. Increase the sleep to 100ms so that system stabilizes between checks. Signed-off-by: Jukka Rissanen --- tests/net/conn_mgr_monitor/src/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/net/conn_mgr_monitor/src/main.c b/tests/net/conn_mgr_monitor/src/main.c index 522a9d50b92..cd8242c10d1 100644 --- a/tests/net/conn_mgr_monitor/src/main.c +++ b/tests/net/conn_mgr_monitor/src/main.c @@ -24,8 +24,9 @@ #include /* Time to wait for NET_MGMT events to finish firing */ -#define EVENT_WAIT_TIME_SHORT K_MSEC(10) -#define EVENT_WAIT_TIME K_MSEC(200) +#define EVENT_WAIT_TIME_SHORT K_MSEC(10) +#define EVENT_WAIT_TIME_MEDIUM K_MSEC(100) +#define EVENT_WAIT_TIME K_MSEC(200) /* Time to wait for IPv6 DAD-gated events to finish. @@ -622,7 +623,7 @@ static void cycle_iface_states(struct net_if *iface, enum ip_order ifa_ipm) zassert_equal(net_if_up(iface), 0, "net_if_up should succeed."); /* Verify that no events have been fired yet */ - k_sleep(EVENT_WAIT_TIME_SHORT); + k_sleep(EVENT_WAIT_TIME_MEDIUM); stats = get_reset_stats(); zassert_equal(stats.event_count_gen, 0, "No events should be fired if connectivity availability did not change."); @@ -653,7 +654,6 @@ static void cycle_iface_states(struct net_if *iface, enum ip_order ifa_ipm) zassert_equal(stats.conn_iface_gen, iface, "The test iface should be blamed."); zassert_equal(stats.conn_iface_ipv4, iface, "The test iface should be blamed."); - /* Add IPv6 */ net_if_ipv6_addr_add(iface, &test_ipv6_a, NET_ADDR_MANUAL, 0);