Skip to content

Commit 16488d6

Browse files
committed
Skip unified tests due to schema version and outstanding issues
Allow entire files to be skipped to preempt schema version errors.
1 parent 6441b0e commit 16488d6

File tree

1 file changed

+41
-2
lines changed

1 file changed

+41
-2
lines changed

src/libmongoc/tests/unified/runner.c

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ typedef struct {
3131
const char *test_description;
3232
} skipped_unified_test_t;
3333

34+
#define SKIP_ALL_TESTS NULL
35+
3436
/* clang-format off */
3537
skipped_unified_test_t SKIPPED_TESTS[] = {
36-
/* CDRIVER-3630, libmongoc does not unconditionally raise an error when using
38+
/* CDRIVER-3630: libmongoc does not unconditionally raise an error when using
3739
* hint option with an unacknowledged write concern */
3840
{"unacknowledged-bulkWrite-delete-hint-clientError", "Unacknowledged bulkWrite deleteOne with hints fails with client-side error"},
3941
{"unacknowledged-bulkWrite-delete-hint-clientError", "Unacknowledged bulkWrite deleteMany with hints fails with client-side error"},
@@ -56,9 +58,39 @@ skipped_unified_test_t SKIPPED_TESTS[] = {
5658
{"unacknowledged-updateMany-hint-clientError", "Unacknowledged updateMany with hint document fails with client-side error"},
5759
{"unacknowledged-updateOne-hint-clientError", "Unacknowledged updateOne with hint string fails with client-side error"},
5860
{"unacknowledged-updateOne-hint-clientError", "Unacknowledged updateOne with hint document fails with client-side error"},
59-
{0}};
61+
/* CDRIVER-4001, DRIVERS-1781, and DRIVERS-1448: 5.0 cursor behavior */
62+
{"poc-command-monitoring", "A successful find event with a getmore and the server kills the cursor"},
63+
/* CDRIVER-3886: serverless testing (schema version 1.4) */
64+
{"poc-crud", SKIP_ALL_TESTS},
65+
{"db-aggregate", SKIP_ALL_TESTS},
66+
{"mongos-unpin", SKIP_ALL_TESTS},
67+
/* CDRIVER-3883: load balancer support (schema version 1.3) */
68+
{"assertNumberConnectionsCheckedOut", SKIP_ALL_TESTS},
69+
{"entity-client-cmap-events", SKIP_ALL_TESTS},
70+
{"entity-find-cursor", SKIP_ALL_TESTS},
71+
{"expectedEventsForClient-eventType", SKIP_ALL_TESTS},
72+
{"ignoreResultAndError", SKIP_ALL_TESTS},
73+
/* CDRIVER-3867: comprehensive Atlas testing (schema version 1.2) */
74+
{"entity-client-storeEventsAsEntities", SKIP_ALL_TESTS},
75+
{0},
76+
};
6077
/* clang-format on */
6178

79+
static bool
80+
is_test_file_skipped (test_file_t *test_file)
81+
{
82+
skipped_unified_test_t *skip;
83+
84+
for (skip = SKIPPED_TESTS; skip->file_description != NULL; skip++) {
85+
if (!strcmp (skip->file_description, test_file->description) &&
86+
skip->test_description == SKIP_ALL_TESTS) {
87+
return true;
88+
}
89+
}
90+
91+
return false;
92+
}
93+
6294
static bool
6395
is_test_skipped (test_t *test)
6496
{
@@ -1489,6 +1521,13 @@ run_one_test_file (bson_t *bson)
14891521

14901522
test_diagnostics_test_info ("test file: %s", test_file->description);
14911523

1524+
if (is_test_file_skipped (test_file)) {
1525+
MONGOC_DEBUG (
1526+
"SKIPPING test file '%s'. Reason: 'explicitly skipped in runner.c'",
1527+
test_file->description);
1528+
goto done;
1529+
}
1530+
14921531
check_schema_version (test_file);
14931532
if (test_file->run_on_requirements) {
14941533
const char *reason;

0 commit comments

Comments
 (0)