Initialize callback epoch for pending transport shutdown test
This commit is contained in:
1 parent
633f1d3044
commit
3c49c2a4aa
1 file changed
+4
-1
@@ -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");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user