File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -682,7 +682,9 @@ _test_connect_timeout (bool pooled, bool try_once)
682682 expected_duration_usec += 1000 * (
683683 connect_timeout_ms + MONGOC_TOPOLOGY_MIN_HEARTBEAT_FREQUENCY_MS );
684684
685- ASSERT_ALMOST_EQUAL (duration_usec , expected_duration_usec );
685+ if (!test_suite_valgrind ()) {
686+ ASSERT_ALMOST_EQUAL (duration_usec , expected_duration_usec );
687+ }
686688
687689 /* single client puts server 0 in cooldown for 5 sec */
688690 if (pooled || !server0_in_cooldown ) {
@@ -704,10 +706,12 @@ _test_connect_timeout (bool pooled, bool try_once)
704706
705707 duration_usec = bson_get_monotonic_time () - start ;
706708
707- if (try_once ) {
708- ASSERT_ALMOST_EQUAL (duration_usec / 1000 , connect_timeout_ms );
709- } else {
710- ASSERT_ALMOST_EQUAL (duration_usec / 1000 , server_selection_timeout_ms );
709+ if (!test_suite_valgrind ()) {
710+ if (try_once ) {
711+ ASSERT_ALMOST_EQUAL (duration_usec / 1000 , connect_timeout_ms );
712+ } else {
713+ ASSERT_ALMOST_EQUAL (duration_usec / 1000 , server_selection_timeout_ms );
714+ }
711715 }
712716
713717 if (pooled ) {
You can’t perform that action at this time.
0 commit comments