File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,17 @@ test_exhaust_cursor(bool pooled)
115
115
pool = test_framework_new_default_client_pool ();
116
116
stream_tracker_track_pool (st , pool );
117
117
client = mongoc_client_pool_pop (pool );
118
+
119
+ // Wait for all background monitoring connections to be established.
120
+ mongoc_uri_t * uri = test_framework_get_uri ();
121
+ // Server 4.4 added support for streaming monitoring and has 2 monitoring connections.
122
+ int monitor_count = test_framework_get_server_version () >= test_framework_str_to_version ("4.4" ) ? 2 : 1 ;
123
+ const mongoc_host_list_t * hosts = mongoc_uri_get_hosts (uri );
124
+ while (hosts ) {
125
+ stream_tracker_assert_eventual_active_count (st , hosts -> host_and_port , monitor_count );
126
+ hosts = hosts -> next ;
127
+ }
128
+ mongoc_uri_destroy (uri );
118
129
} else {
119
130
client = test_framework_new_default_client ();
120
131
stream_tracker_track_client (st , client );
You can’t perform that action at this time.
0 commit comments