From 79ecfa3504aff1335debc5b5bbc5deb5960e950d Mon Sep 17 00:00:00 2001 From: Denis Biryukov Date: Thu, 12 Dec 2024 14:20:33 +0100 Subject: [PATCH] add delay to test --- tests/z_int_advanced_pub_sub_test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/z_int_advanced_pub_sub_test.c b/tests/z_int_advanced_pub_sub_test.c index 4b2787396..f18ebf548 100644 --- a/tests/z_int_advanced_pub_sub_test.c +++ b/tests/z_int_advanced_pub_sub_test.c @@ -75,9 +75,9 @@ int run_publisher() { SEM_WAIT(sem_sub); // values for subscribe - for (int i = 0; i < values_count / 2; ++i) { + for (int i = values_count / 2; i < values_count; ++i) { z_owned_bytes_t payload; - z_bytes_from_static_str(&payload, values[values_count / 2 + i]); + z_bytes_from_static_str(&payload, values[i]); ze_advanced_publisher_put(z_loan(pub), z_move(payload), NULL); } @@ -124,6 +124,7 @@ void data_handler(z_loaned_sample_t *sample, void *arg) { int run_subscriber() { printf("wait: sem_pub\n"); SEM_WAIT(sem_pub); + z_sleep_s(1); z_owned_config_t config; z_config_default(&config);