Skip to content

Commit bf5e1d3

Browse files
jmikolaajdavis
authored andcommitted
CDRIVER-2057: localThresholdMS should default to 15 milliseconds
# Conflicts: # tests/json-test.c
1 parent af8a0dc commit bf5e1d3

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/mongoc/mongoc-topology-private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#define MONGOC_TOPOLOGY_MIN_HEARTBEAT_FREQUENCY_MS 500
2828
#define MONGOC_TOPOLOGY_SOCKET_CHECK_INTERVAL_MS 5000
2929
#define MONGOC_TOPOLOGY_COOLDOWN_MS 5000
30-
#define MONGOC_TOPOLOGY_LOCAL_THRESHOLD_MS 15000
30+
#define MONGOC_TOPOLOGY_LOCAL_THRESHOLD_MS 15
3131
#define MONGOC_TOPOLOGY_SERVER_SELECTION_TIMEOUT_MS 30000
3232
#define MONGOC_TOPOLOGY_HEARTBEAT_FREQUENCY_MS_MULTI_THREADED 10000
3333
#define MONGOC_TOPOLOGY_HEARTBEAT_FREQUENCY_MS_SINGLE_THREADED 60000

tests/json-test.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -451,11 +451,8 @@ test_server_selection_logic_cb (bson_t *test)
451451
assert (bson_iter_init_find (&iter, test, "in_latency_window"));
452452

453453
/* TODO: use topology_select instead? */
454-
mongoc_topology_description_suitable_servers (&selected_servers,
455-
op,
456-
&topology,
457-
read_prefs,
458-
15);
454+
mongoc_topology_description_suitable_servers (
455+
&selected_servers, op, &topology, read_prefs, MONGOC_TOPOLOGY_LOCAL_THRESHOLD_MS);
459456

460457
/* check each server in expected_servers is in selected_servers */
461458
memset (matched_servers, 0, sizeof (matched_servers));

0 commit comments

Comments
 (0)