From 3c49c2a4aa252008c14c0327c886974732ed9833 Mon Sep 17 00:00:00 2001 From: evgeny Date: Thu, 22 Oct 2026 09:59:13 +0200 Subject: [PATCH] Initialize callback epoch for pending transport shutdown test --- tests/test_stream_service.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_stream_service.c b/tests/test_stream_service.c index 5f88e243..1c879289 100644 --- a/tests/test_stream_service.c +++ b/tests/test_stream_service.c @@ -559,6 +559,8 @@ static void test_pending_down(void) { CHECK(stream_publish_open(nodes[3], GROUP1, NULL, &publisher) == STREAM_OK); struct stream_info origin; CHECK(stream_get_info(publisher, &origin) == STREAM_OK); wait_state(1, 3, GROUP1, origin.descriptor.source_epoch, 0); + bootstrap.phase = "pending DOWN/DELETE"; bootstrap.source_epoch = origin.descriptor.source_epoch; + unsigned closed = bootstrap.closed, data = bootstrap.data; stream_set_event_callback(nodes[1], bootstrap_event, NULL); CHECK(stream_subscribe_manual_open(nodes[1], GROUP1, nodes[3]->node_id, &subscriber) == STREAM_OK); struct STREAM_RECEIVE *probe = NULL; @@ -569,7 +571,8 @@ static void test_pending_down(void) { CHECK(stream_receive_get_info(probe, &info) == STREAM_OK && info.state == STREAM_RECEIVE_CLOSED && info.reason == STREAM_REASON_TRANSPORT); stream_receive_close(probe); stream_close(subscriber); stream_close(publisher); - test_clock_run_for(ua, 1000); + run_until(&bootstrap.closed, closed + 1); + CHECK(bootstrap.data == data); stream_set_event_callback(nodes[1], on_stream, NULL); DEBUG_INFO(DEBUG_CATEGORY_STREAM, "[PASS] transport DOWN/DELETE still cancels pending request"); }