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);