Skip to content

Commit

Permalink
unit test: delay before discover
Browse files Browse the repository at this point in the history
Ensure the service has time to register.
  • Loading branch information
bradjc committed Aug 25, 2023
1 parent 7f29208 commit a4a17c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libtock/unit_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ void unit_test_runner(unit_test_fun *tests, uint32_t test_count,
test->count = test_count;
test->timeout_ms = timeout_ms;

// Establish communication with the test supervisor service.
// Establish communication with the test supervisor service. First delay 10 ms
// to ensure the supervisor service has time to register.
delay_ms(10);
size_t test_svc;
int err = ipc_discover(svc_name, &test_svc);
if (err < 0) return;
Expand Down

0 comments on commit a4a17c3

Please sign in to comment.