Skip to content

Commit e2a5320

Browse files
bazile-clydekevinAlbs
authored andcommitted
CDRIVER-3373 Remove readConcern snapshot in sharded txn tests (#628)
1 parent 2e84c32 commit e2a5320

File tree

4 files changed

+31
-236
lines changed

4 files changed

+31
-236
lines changed

src/libmongoc/tests/json-test.c

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,37 +1504,6 @@ _in_blacklist (const bson_t *test, char **blacklist, uint32_t blacklist_len)
15041504

15051505
return false;
15061506
}
1507-
static bool
1508-
_should_skip_due_to_server_39704 (const bson_t *test)
1509-
{
1510-
char *blacklist[] = {
1511-
"only first countDocuments includes readConcern",
1512-
"only first find includes readConcern",
1513-
"only first aggregate includes readConcern",
1514-
"only first distinct includes readConcern",
1515-
"only first runCommand includes readConcern",
1516-
"transaction options inherited from defaultTransactionOptions",
1517-
"startTransaction options override defaults",
1518-
"defaultTransactionOptions override client options",
1519-
"readConcern snapshot in startTransaction options",
1520-
"withTransaction inherits transaction options from "
1521-
"defaultTransactionOptions",
1522-
"withTransaction explicit transaction options",
1523-
"withTransaction explicit transaction options override "
1524-
"defaultTransactionOptions",
1525-
"withTransaction explicit transaction options override client options"};
1526-
1527-
/* Only an issue for sharded clusters. */
1528-
if (!test_framework_is_mongos ()) {
1529-
return false;
1530-
}
1531-
1532-
if (_in_blacklist (test, blacklist, sizeof (blacklist) / sizeof (char *))) {
1533-
return true;
1534-
}
1535-
1536-
return false;
1537-
}
15381507

15391508
static bool
15401509
_should_skip_due_to_unsupported_operation (const bson_t *test)
@@ -1632,14 +1601,6 @@ run_json_general_test (const json_test_config_t *config)
16321601
continue;
16331602
}
16341603

1635-
if (_should_skip_due_to_server_39704 (&test)) {
1636-
fprintf (stderr,
1637-
" - %s SKIPPED, reason: SERVER-39704 causes sharded tests to "
1638-
"fail when using readConcern: snapshot\n",
1639-
description);
1640-
continue;
1641-
}
1642-
16431604
if (_should_skip_due_to_unsupported_operation (&test)) {
16441605
fprintf (
16451606
stderr,

src/libmongoc/tests/json/transactions/read-concern.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"arguments": {
4040
"options": {
4141
"readConcern": {
42-
"level": "snapshot"
42+
"level": "majority"
4343
}
4444
}
4545
}
@@ -110,7 +110,7 @@
110110
"cursor": {},
111111
"lsid": "session0",
112112
"readConcern": {
113-
"level": "snapshot"
113+
"level": "majority"
114114
},
115115
"txnNumber": {
116116
"$numberLong": "1"
@@ -202,7 +202,7 @@
202202
"arguments": {
203203
"options": {
204204
"readConcern": {
205-
"level": "snapshot"
205+
"level": "majority"
206206
}
207207
}
208208
}
@@ -274,7 +274,7 @@
274274
"batchSize": 3,
275275
"lsid": "session0",
276276
"readConcern": {
277-
"level": "snapshot"
277+
"level": "majority"
278278
},
279279
"txnNumber": {
280280
"$numberLong": "1"
@@ -389,7 +389,7 @@
389389
"arguments": {
390390
"options": {
391391
"readConcern": {
392-
"level": "snapshot"
392+
"level": "majority"
393393
}
394394
}
395395
}
@@ -484,7 +484,7 @@
484484
},
485485
"lsid": "session0",
486486
"readConcern": {
487-
"level": "snapshot"
487+
"level": "majority"
488488
},
489489
"txnNumber": {
490490
"$numberLong": "1"
@@ -608,7 +608,7 @@
608608
"arguments": {
609609
"options": {
610610
"readConcern": {
611-
"level": "snapshot"
611+
"level": "majority"
612612
}
613613
}
614614
}
@@ -664,7 +664,7 @@
664664
"key": "_id",
665665
"lsid": "session0",
666666
"readConcern": {
667-
"level": "snapshot"
667+
"level": "majority"
668668
},
669669
"txnNumber": {
670670
"$numberLong": "1"
@@ -741,7 +741,7 @@
741741
"arguments": {
742742
"options": {
743743
"readConcern": {
744-
"level": "snapshot"
744+
"level": "majority"
745745
}
746746
}
747747
}
@@ -780,7 +780,7 @@
780780
"find": "test",
781781
"lsid": "session0",
782782
"readConcern": {
783-
"level": "snapshot"
783+
"level": "majority"
784784
},
785785
"txnNumber": {
786786
"$numberLong": "1"

0 commit comments

Comments
 (0)