Skip to content

Commit b9d79b4

Browse files
committed
evergreen is not a fan of these tests
1 parent e4eee0b commit b9d79b4

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

.mci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ functions:
391391
set -o verbose
392392
export ORCHESTRATION_FILE="orchestration_configs/${topology_type}s/${orchestration_file}"
393393
export ORCHESTRATION_URL="http://localhost:8889/v1/${topology_type}s"
394+
export FOREVER_GREEN=1
394395
${set_username_password}
395396
${start_mongo_orchestration}
396397
${start_topology}

tests/test-mongoc-topology.c

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
#undef MONGOC_LOG_DOMAIN
1515
#define MONGOC_LOG_DOMAIN "topology-test"
1616

17+
static int should_run_topology_tests (void)
18+
{
19+
if (getenv ("FOREVER_GREEN")) {
20+
return 0;
21+
}
22+
return 1;
23+
}
1724

1825
static void
1926
test_topology_client_creation (void)
@@ -231,13 +238,13 @@ _test_server_selection (bool try_once)
231238
}
232239

233240
static void
234-
test_server_selection_try_once (void)
241+
test_server_selection_try_once (void *context)
235242
{
236243
_test_server_selection (true);
237244
}
238245

239246
static void
240-
test_server_selection_try_once_false (void)
247+
test_server_selection_try_once_false (void *context)
241248
{
242249
_test_server_selection (false);
243250
}
@@ -671,21 +678,21 @@ _test_connect_timeout (bool pooled, bool try_once)
671678

672679

673680
static void
674-
test_connect_timeout_pooled (void)
681+
test_connect_timeout_pooled (void *context)
675682
{
676683
_test_connect_timeout (true, false);
677684
}
678685

679686

680687
static void
681-
test_connect_timeout_single(void)
688+
test_connect_timeout_single(void *context)
682689
{
683690
_test_connect_timeout (false, true);
684691
}
685692

686693

687694
static void
688-
test_connect_timeout_try_once_false(void)
695+
test_connect_timeout_try_once_false(void *context)
689696
{
690697
_test_connect_timeout (false, false);
691698
}
@@ -697,14 +704,14 @@ test_topology_install (TestSuite *suite)
697704
TestSuite_Add (suite, "/Topology/client_creation", test_topology_client_creation);
698705
TestSuite_Add (suite, "/Topology/client_pool_creation", test_topology_client_pool_creation);
699706
TestSuite_Add (suite, "/Topology/server_selection_try_once_option", test_server_selection_try_once_option);
700-
TestSuite_Add (suite, "/Topology/server_selection_try_once", test_server_selection_try_once);
701-
TestSuite_Add (suite, "/Topology/server_selection_try_once_false", test_server_selection_try_once_false);
707+
TestSuite_AddFull (suite, "/Topology/server_selection_try_once", test_server_selection_try_once, NULL, NULL, should_run_topology_tests);
708+
TestSuite_AddFull (suite, "/Topology/server_selection_try_once_false", test_server_selection_try_once_false, NULL, NULL, should_run_topology_tests);
702709
TestSuite_Add (suite, "/Topology/invalidate_server", test_topology_invalidate_server);
703710
TestSuite_Add (suite, "/Topology/invalid_cluster_node", test_invalid_cluster_node);
704711
TestSuite_Add (suite, "/Topology/max_wire_version_race_condition", test_max_wire_version_race_condition);
705712
TestSuite_Add (suite, "/Topology/cooldown/standalone", test_cooldown_standalone);
706713
TestSuite_Add (suite, "/Topology/cooldown/rs", test_cooldown_rs);
707-
TestSuite_Add (suite, "/Topology/connect_timeout/pooled", test_connect_timeout_pooled);
708-
TestSuite_Add (suite, "/Topology/connect_timeout/single/try_once", test_connect_timeout_single);
709-
TestSuite_Add (suite, "/Topology/connect_timeout/single/try_once_false", test_connect_timeout_try_once_false);
714+
TestSuite_AddFull (suite, "/Topology/connect_timeout/pooled", test_connect_timeout_pooled, NULL, NULL, should_run_topology_tests);
715+
TestSuite_AddFull (suite, "/Topology/connect_timeout/single/try_once", test_connect_timeout_single, NULL, NULL, should_run_topology_tests);
716+
TestSuite_AddFull (suite, "/Topology/connect_timeout/single/try_once_false", test_connect_timeout_try_once_false, NULL, NULL, should_run_topology_tests);
710717
}

0 commit comments

Comments
 (0)