diff --git a/tests/test_stream_service.c b/tests/test_stream_service.c index c9a9738a..cc1e25d7 100644 --- a/tests/test_stream_service.c +++ b/tests/test_stream_service.c @@ -1069,6 +1069,8 @@ static void relay_test_raw(struct ETCP_CONN *conn, struct ll_entry *entry) { uint64_t start = stream_read_be(m.payload + 8, 8); if (!relay_race.accepted) relay_race.start = start; CHECK(start == relay_race.start && m.subblock < 8); relay_race.accepted |= 1u << m.subblock; + DEBUG_DEBUG(DEBUG_CATEGORY_STREAM, "bootstrap test helper ACCEPT sub=%u start=%llu mask=%02x", + m.subblock, (unsigned long long)start, relay_race.accepted); } } if (relay_drop_source && index != 1 && conn->peer_node_id == nodes[3]->node_id) { @@ -1244,7 +1246,12 @@ static void test_supernode_relay(void) { CHECK(relay_data[2] == expected_data && relay_requests_seen && !relay_data[1]); CHECK(get_time_tb() - started < 10000 && relay_race.request_tb - started >= 990); uint64_t connected_ms = (get_time_tb() - started) / 10; - test_clock_run_for(ua, 1000); CHECK(relay_race.accepted == 255); + /* Первый FEC готов после k ACCEPT; пустой ранний субпоток повторяется через 100ms плюс фазу network tick. */ + deadline = get_time_tb() + 5000; + while (relay_race.accepted != 255 && get_time_tb() < deadline) test_clock_poll(ua, 100); + if (relay_race.accepted != 255) + DEBUG_ERROR(DEBUG_CATEGORY_STREAM, "bootstrap test incomplete helper ACCEPT mask=%02x after first FEC", relay_race.accepted); + CHECK(relay_race.accepted == 255); CHECK(relay_race.helper_subscribes && !relay_race.source_subscribes); relay_release_info(); test_clock_run_for(ua, 1000); CHECK(!relay_race.source_subscribes && relay_data[2] == expected_data);