Skip to content

Commit 74b4061

Browse files
committed
PYTHON-2676 Unified Test Runner changes in preparation for Load Balancer Support (#623)
Resync crud, change stream, SDAM, server_selection, transactions, uri-options, tests. PYTHON-2348 Correctly express lack of event assertions in change stream tests. (cherry picked from commit 2a74601)
1 parent 2f4a7c8 commit 74b4061

File tree

230 files changed

+11621
-8438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+11621
-8438
lines changed

test/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,8 @@ def check_auth_with_sharding(self, func):
621621
func=func)
622622

623623
def is_topology_type(self, topologies):
624+
if 'load-balanced' in topologies and self.load_balancer:
625+
return True
624626
if 'single' in topologies and not (self.is_mongos or self.is_rs):
625627
return True
626628
if 'replicaset' in topologies and self.is_rs:

test/change_streams/legacy/change-streams-errors.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"changeStreamPipeline": [],
1515
"changeStreamOptions": {},
1616
"operations": [],
17-
"expectations": [],
17+
"expectations": null,
1818
"result": {
1919
"error": {
2020
"code": 40573
@@ -78,7 +78,8 @@
7878
"target": "collection",
7979
"topology": [
8080
"replicaset",
81-
"sharded"
81+
"sharded",
82+
"load-balanced"
8283
],
8384
"changeStreamPipeline": [
8485
{
@@ -125,7 +126,8 @@
125126
"target": "collection",
126127
"topology": [
127128
"replicaset",
128-
"sharded"
129+
"sharded",
130+
"load-balanced"
129131
],
130132
"changeStreamPipeline": [],
131133
"changeStreamOptions": {},

test/change_streams/legacy/change-streams-resume-whitelist.json renamed to test/change_streams/legacy/change-streams-resume-allowlist.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"target": "collection",
2121
"topology": [
2222
"replicaset",
23-
"sharded"
23+
"sharded",
24+
"load-balanced"
2425
],
2526
"changeStreamPipeline": [],
2627
"changeStreamOptions": {},
@@ -777,7 +778,7 @@
777778
}
778779
},
779780
{
780-
"description": "change stream resumes after NotMaster",
781+
"description": "change stream resumes after NotWritablePrimary",
781782
"minServerVersion": "4.2",
782783
"maxServerVersion": "4.2.99",
783784
"failPoint": {
@@ -1068,7 +1069,7 @@
10681069
}
10691070
},
10701071
{
1071-
"description": "change stream resumes after NotMasterNoSlaveOk",
1072+
"description": "change stream resumes after NotPrimaryNoSecondaryOk",
10721073
"minServerVersion": "4.2",
10731074
"maxServerVersion": "4.2.99",
10741075
"failPoint": {
@@ -1165,7 +1166,7 @@
11651166
}
11661167
},
11671168
{
1168-
"description": "change stream resumes after NotMasterOrSecondary",
1169+
"description": "change stream resumes after NotPrimaryOrSecondary",
11691170
"minServerVersion": "4.2",
11701171
"maxServerVersion": "4.2.99",
11711172
"failPoint": {

test/change_streams/legacy/change-streams-resume-errorLabels.json

+39-21
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"target": "collection",
1919
"topology": [
2020
"replicaset",
21-
"sharded"
21+
"sharded",
22+
"load-balanced"
2223
],
2324
"changeStreamPipeline": [],
2425
"changeStreamOptions": {},
@@ -111,7 +112,8 @@
111112
"target": "collection",
112113
"topology": [
113114
"replicaset",
114-
"sharded"
115+
"sharded",
116+
"load-balanced"
115117
],
116118
"changeStreamPipeline": [],
117119
"changeStreamOptions": {},
@@ -204,7 +206,8 @@
204206
"target": "collection",
205207
"topology": [
206208
"replicaset",
207-
"sharded"
209+
"sharded",
210+
"load-balanced"
208211
],
209212
"changeStreamPipeline": [],
210213
"changeStreamOptions": {},
@@ -297,7 +300,8 @@
297300
"target": "collection",
298301
"topology": [
299302
"replicaset",
300-
"sharded"
303+
"sharded",
304+
"load-balanced"
301305
],
302306
"changeStreamPipeline": [],
303307
"changeStreamOptions": {},
@@ -390,7 +394,8 @@
390394
"target": "collection",
391395
"topology": [
392396
"replicaset",
393-
"sharded"
397+
"sharded",
398+
"load-balanced"
394399
],
395400
"changeStreamPipeline": [],
396401
"changeStreamOptions": {},
@@ -483,7 +488,8 @@
483488
"target": "collection",
484489
"topology": [
485490
"replicaset",
486-
"sharded"
491+
"sharded",
492+
"load-balanced"
487493
],
488494
"changeStreamPipeline": [],
489495
"changeStreamOptions": {},
@@ -576,7 +582,8 @@
576582
"target": "collection",
577583
"topology": [
578584
"replicaset",
579-
"sharded"
585+
"sharded",
586+
"load-balanced"
580587
],
581588
"changeStreamPipeline": [],
582589
"changeStreamOptions": {},
@@ -654,7 +661,7 @@
654661
}
655662
},
656663
{
657-
"description": "change stream resumes after NotMaster",
664+
"description": "change stream resumes after NotWritablePrimary",
658665
"minServerVersion": "4.3.1",
659666
"failPoint": {
660667
"configureFailPoint": "failGetMoreAfterCursorCheckout",
@@ -669,7 +676,8 @@
669676
"target": "collection",
670677
"topology": [
671678
"replicaset",
672-
"sharded"
679+
"sharded",
680+
"load-balanced"
673681
],
674682
"changeStreamPipeline": [],
675683
"changeStreamOptions": {},
@@ -762,7 +770,8 @@
762770
"target": "collection",
763771
"topology": [
764772
"replicaset",
765-
"sharded"
773+
"sharded",
774+
"load-balanced"
766775
],
767776
"changeStreamPipeline": [],
768777
"changeStreamOptions": {},
@@ -855,7 +864,8 @@
855864
"target": "collection",
856865
"topology": [
857866
"replicaset",
858-
"sharded"
867+
"sharded",
868+
"load-balanced"
859869
],
860870
"changeStreamPipeline": [],
861871
"changeStreamOptions": {},
@@ -933,7 +943,7 @@
933943
}
934944
},
935945
{
936-
"description": "change stream resumes after NotMasterNoSlaveOk",
946+
"description": "change stream resumes after NotPrimaryNoSecondaryOk",
937947
"minServerVersion": "4.3.1",
938948
"failPoint": {
939949
"configureFailPoint": "failGetMoreAfterCursorCheckout",
@@ -948,7 +958,8 @@
948958
"target": "collection",
949959
"topology": [
950960
"replicaset",
951-
"sharded"
961+
"sharded",
962+
"load-balanced"
952963
],
953964
"changeStreamPipeline": [],
954965
"changeStreamOptions": {},
@@ -1026,7 +1037,7 @@
10261037
}
10271038
},
10281039
{
1029-
"description": "change stream resumes after NotMasterOrSecondary",
1040+
"description": "change stream resumes after NotPrimaryOrSecondary",
10301041
"minServerVersion": "4.3.1",
10311042
"failPoint": {
10321043
"configureFailPoint": "failGetMoreAfterCursorCheckout",
@@ -1041,7 +1052,8 @@
10411052
"target": "collection",
10421053
"topology": [
10431054
"replicaset",
1044-
"sharded"
1055+
"sharded",
1056+
"load-balanced"
10451057
],
10461058
"changeStreamPipeline": [],
10471059
"changeStreamOptions": {},
@@ -1134,7 +1146,8 @@
11341146
"target": "collection",
11351147
"topology": [
11361148
"replicaset",
1137-
"sharded"
1149+
"sharded",
1150+
"load-balanced"
11381151
],
11391152
"changeStreamPipeline": [],
11401153
"changeStreamOptions": {},
@@ -1227,7 +1240,8 @@
12271240
"target": "collection",
12281241
"topology": [
12291242
"replicaset",
1230-
"sharded"
1243+
"sharded",
1244+
"load-balanced"
12311245
],
12321246
"changeStreamPipeline": [],
12331247
"changeStreamOptions": {},
@@ -1320,7 +1334,8 @@
13201334
"target": "collection",
13211335
"topology": [
13221336
"replicaset",
1323-
"sharded"
1337+
"sharded",
1338+
"load-balanced"
13241339
],
13251340
"changeStreamPipeline": [],
13261341
"changeStreamOptions": {},
@@ -1413,7 +1428,8 @@
14131428
"target": "collection",
14141429
"topology": [
14151430
"replicaset",
1416-
"sharded"
1431+
"sharded",
1432+
"load-balanced"
14171433
],
14181434
"changeStreamPipeline": [],
14191435
"changeStreamOptions": {},
@@ -1512,7 +1528,8 @@
15121528
"target": "collection",
15131529
"topology": [
15141530
"replicaset",
1515-
"sharded"
1531+
"sharded",
1532+
"load-balanced"
15161533
],
15171534
"changeStreamPipeline": [],
15181535
"changeStreamOptions": {},
@@ -1608,7 +1625,8 @@
16081625
"target": "collection",
16091626
"topology": [
16101627
"replicaset",
1611-
"sharded"
1628+
"sharded",
1629+
"load-balanced"
16121630
],
16131631
"changeStreamPipeline": [],
16141632
"changeStreamOptions": {},

test/change_streams/legacy/change-streams.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
}
8383
}
8484
],
85-
"expectations": [],
85+
"expectations": null,
8686
"result": {
8787
"success": [
8888
{

0 commit comments

Comments
 (0)