Skip to content

Commit d6d994e

Browse files
committed
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 <[email protected]>
1 parent 29eb491 commit d6d994e

File tree

1 file changed

+4
-4
lines changed
  • tests/net/conn_mgr_monitor/src

1 file changed

+4
-4
lines changed

tests/net/conn_mgr_monitor/src/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@
2424
#include <zephyr/logging/log.h>
2525

2626
/* Time to wait for NET_MGMT events to finish firing */
27-
#define EVENT_WAIT_TIME_SHORT K_MSEC(10)
28-
#define EVENT_WAIT_TIME K_MSEC(200)
27+
#define EVENT_WAIT_TIME_SHORT K_MSEC(10)
28+
#define EVENT_WAIT_TIME_MEDIUM K_MSEC(100)
29+
#define EVENT_WAIT_TIME K_MSEC(200)
2930

3031

3132
/* 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)
622623
zassert_equal(net_if_up(iface), 0, "net_if_up should succeed.");
623624

624625
/* Verify that no events have been fired yet */
625-
k_sleep(EVENT_WAIT_TIME_SHORT);
626+
k_sleep(EVENT_WAIT_TIME_MEDIUM);
626627
stats = get_reset_stats();
627628
zassert_equal(stats.event_count_gen, 0,
628629
"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)
653654
zassert_equal(stats.conn_iface_gen, iface, "The test iface should be blamed.");
654655
zassert_equal(stats.conn_iface_ipv4, iface, "The test iface should be blamed.");
655656

656-
657657
/* Add IPv6 */
658658
net_if_ipv6_addr_add(iface, &test_ipv6_a, NET_ADDR_MANUAL, 0);
659659

0 commit comments

Comments
 (0)