@@ -1064,44 +1064,44 @@ test_mongoc_uri_long_hostname (void)
1064
1064
bson_free (host );
1065
1065
}
1066
1066
1067
+ static void
1067
1068
test_mongoc_uri_local_threshold_ms (void )
1068
1069
{
1069
1070
mongoc_uri_t * uri ;
1070
1071
1071
1072
uri = mongoc_uri_new ("mongodb://localhost/" );
1072
1073
1073
1074
/* localthresholdms isn't set, return the default */
1074
- ASSERT_CMPINT (mongoc_uri_get_local_threshold_option (uri ), = = ,
1075
- MONGOC_TOPOLOGY_LOCAL_THRESHOLD_MS );
1076
- ASSERT (
1075
+ ASSERT_CMPINT (mongoc_uri_get_local_threshold_option (uri ),
1076
+ = = , MONGOC_TOPOLOGY_LOCAL_THRESHOLD_MS );
1077
+ ASSERT (
1077
1078
mongoc_uri_set_option_as_int32 (uri , "localthresholdms" , 99 ));
1078
1079
ASSERT_CMPINT (mongoc_uri_get_local_threshold_option (uri ), = = , 99 );
1079
1080
1080
- mongoc_uri_destroy (uri );
1081
-
1081
+ mongoc_uri_destroy (uri );
1082
1082
1083
- uri = mongoc_uri_new (
1084
- "mongodb://localhost/?localthresholdms=0" );
1083
+ uri =
1084
+ mongoc_uri_new ( "mongodb://localhost/?localthresholdms=0" );
1085
1085
1086
1086
ASSERT_CMPINT (mongoc_uri_get_local_threshold_option (uri ), = = , 0 );
1087
1087
ASSERT (
1088
1088
mongoc_uri_set_option_as_int32 (uri , "localthresholdms" , 99 ));
1089
1089
ASSERT_CMPINT (mongoc_uri_get_local_threshold_option (uri ), = = , 99 );
1090
1090
1091
- mongoc_uri_destroy (uri );
1092
-
1091
+ mongoc_uri_destroy (uri );
1093
1092
1094
- uri = mongoc_uri_new (
1095
- "mongodb://localhost/?" MONGOC_URI_LOCALTHRESHOLDMS "=-1" );
1093
+ uri = mongoc_uri_new ("mongodb://localhost/?localthresholdms=-1" );
1096
1094
1097
1095
/* localthresholdms is invalid, return the default */
1098
1096
capture_logs (true);
1099
- ASSERT_CMPINT (mongoc_uri_get_local_threshold_option (uri ), = = ,
1100
- MONGOC_TOPOLOGY_LOCAL_THRESHOLD_MS );
1097
+ ASSERT_CMPINT (mongoc_uri_get_local_threshold_option (uri ),
1098
+ = = ,
1099
+ MONGOC_TOPOLOGY_LOCAL_THRESHOLD_MS );
1101
1100
ASSERT_CAPTURED_LOG ("mongoc_uri_get_local_threshold_option" ,
1102
- MONGOC_LOG_LEVEL_WARNING , "Invalid localThresholdMS: -1" );
1101
+ MONGOC_LOG_LEVEL_WARNING ,
1102
+ "Invalid localThresholdMS: -1" );
1103
1103
1104
- mongoc_uri_destroy (uri );
1104
+ mongoc_uri_destroy (uri );
1105
1105
}
1106
1106
1107
1107
void
@@ -1123,5 +1123,6 @@ test_uri_install (TestSuite *suite)
1123
1123
TestSuite_Add (
1124
1124
suite , "/Uri/compound_setters" , test_mongoc_uri_compound_setters );
1125
1125
TestSuite_Add (suite , "/Uri/long_hostname" , test_mongoc_uri_long_hostname );
1126
- TestSuite_Add (suite , "/Uri/local_threshold_ms" , test_mongoc_uri_local_threshold_ms );
1126
+ TestSuite_Add (
1127
+ suite , "/Uri/local_threshold_ms" , test_mongoc_uri_local_threshold_ms );
1127
1128
}
0 commit comments