Skip to content

Commit 1c2a575

Browse files
committed
PYTHON-2221 Resync SDAM error handling spec tests
1 parent d834236 commit 1c2a575

14 files changed

+516
-33
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"description": "Post-4.2 InterruptedAtShutdown error",
3+
"uri": "mongodb://a/?replicaSet=rs",
4+
"phases": [
5+
{
6+
"description": "Primary A is discovered",
7+
"responses": [
8+
[
9+
"a:27017",
10+
{
11+
"ok": 1,
12+
"ismaster": true,
13+
"hosts": [
14+
"a:27017"
15+
],
16+
"setName": "rs",
17+
"minWireVersion": 0,
18+
"maxWireVersion": 8
19+
}
20+
]
21+
],
22+
"outcome": {
23+
"servers": {
24+
"a:27017": {
25+
"type": "RSPrimary",
26+
"setName": "rs",
27+
"topologyVersion": null,
28+
"pool": {
29+
"generation": 0
30+
}
31+
}
32+
},
33+
"topologyType": "ReplicaSetWithPrimary",
34+
"logicalSessionTimeoutMinutes": null,
35+
"setName": "rs"
36+
}
37+
},
38+
{
39+
"description": "Post-4.2 InterruptedAtShutdown error marks server Unknown",
40+
"applicationErrors": [
41+
{
42+
"address": "a:27017",
43+
"when": "afterHandshakeCompletes",
44+
"maxWireVersion": 8,
45+
"type": "command",
46+
"response": {
47+
"ok": 0,
48+
"errmsg": "InterruptedAtShutdown",
49+
"code": 11600
50+
}
51+
}
52+
],
53+
"outcome": {
54+
"servers": {
55+
"a:27017": {
56+
"type": "Unknown",
57+
"topologyVersion": null,
58+
"pool": {
59+
"generation": 1
60+
}
61+
}
62+
},
63+
"topologyType": "ReplicaSetNoPrimary",
64+
"logicalSessionTimeoutMinutes": null,
65+
"setName": "rs"
66+
}
67+
}
68+
]
69+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"description": "Post-4.2 InterruptedDueToReplStateChange error",
3+
"uri": "mongodb://a/?replicaSet=rs",
4+
"phases": [
5+
{
6+
"description": "Primary A is discovered",
7+
"responses": [
8+
[
9+
"a:27017",
10+
{
11+
"ok": 1,
12+
"ismaster": true,
13+
"hosts": [
14+
"a:27017"
15+
],
16+
"setName": "rs",
17+
"minWireVersion": 0,
18+
"maxWireVersion": 8
19+
}
20+
]
21+
],
22+
"outcome": {
23+
"servers": {
24+
"a:27017": {
25+
"type": "RSPrimary",
26+
"setName": "rs",
27+
"topologyVersion": null,
28+
"pool": {
29+
"generation": 0
30+
}
31+
}
32+
},
33+
"topologyType": "ReplicaSetWithPrimary",
34+
"logicalSessionTimeoutMinutes": null,
35+
"setName": "rs"
36+
}
37+
},
38+
{
39+
"description": "Post-4.2 InterruptedDueToReplStateChange error marks server Unknown",
40+
"applicationErrors": [
41+
{
42+
"address": "a:27017",
43+
"when": "afterHandshakeCompletes",
44+
"maxWireVersion": 8,
45+
"type": "command",
46+
"response": {
47+
"ok": 0,
48+
"errmsg": "InterruptedDueToReplStateChange",
49+
"code": 11602
50+
}
51+
}
52+
],
53+
"outcome": {
54+
"servers": {
55+
"a:27017": {
56+
"type": "Unknown",
57+
"topologyVersion": null,
58+
"pool": {
59+
"generation": 0
60+
}
61+
}
62+
},
63+
"topologyType": "ReplicaSetNoPrimary",
64+
"logicalSessionTimeoutMinutes": null,
65+
"setName": "rs"
66+
}
67+
}
68+
]
69+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"description": "Post-4.2 NotMaster error",
3+
"uri": "mongodb://a/?replicaSet=rs",
4+
"phases": [
5+
{
6+
"description": "Primary A is discovered",
7+
"responses": [
8+
[
9+
"a:27017",
10+
{
11+
"ok": 1,
12+
"ismaster": true,
13+
"hosts": [
14+
"a:27017"
15+
],
16+
"setName": "rs",
17+
"minWireVersion": 0,
18+
"maxWireVersion": 8
19+
}
20+
]
21+
],
22+
"outcome": {
23+
"servers": {
24+
"a:27017": {
25+
"type": "RSPrimary",
26+
"setName": "rs",
27+
"topologyVersion": null,
28+
"pool": {
29+
"generation": 0
30+
}
31+
}
32+
},
33+
"topologyType": "ReplicaSetWithPrimary",
34+
"logicalSessionTimeoutMinutes": null,
35+
"setName": "rs"
36+
}
37+
},
38+
{
39+
"description": "Post-4.2 NotMaster error marks server Unknown",
40+
"applicationErrors": [
41+
{
42+
"address": "a:27017",
43+
"when": "afterHandshakeCompletes",
44+
"maxWireVersion": 8,
45+
"type": "command",
46+
"response": {
47+
"ok": 0,
48+
"errmsg": "NotMaster",
49+
"code": 10107
50+
}
51+
}
52+
],
53+
"outcome": {
54+
"servers": {
55+
"a:27017": {
56+
"type": "Unknown",
57+
"topologyVersion": null,
58+
"pool": {
59+
"generation": 0
60+
}
61+
}
62+
},
63+
"topologyType": "ReplicaSetNoPrimary",
64+
"logicalSessionTimeoutMinutes": null,
65+
"setName": "rs"
66+
}
67+
}
68+
]
69+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"description": "Post-4.2 NotMasterNoSlaveOk error",
3+
"uri": "mongodb://a/?replicaSet=rs",
4+
"phases": [
5+
{
6+
"description": "Primary A is discovered",
7+
"responses": [
8+
[
9+
"a:27017",
10+
{
11+
"ok": 1,
12+
"ismaster": true,
13+
"hosts": [
14+
"a:27017"
15+
],
16+
"setName": "rs",
17+
"minWireVersion": 0,
18+
"maxWireVersion": 8
19+
}
20+
]
21+
],
22+
"outcome": {
23+
"servers": {
24+
"a:27017": {
25+
"type": "RSPrimary",
26+
"setName": "rs",
27+
"topologyVersion": null,
28+
"pool": {
29+
"generation": 0
30+
}
31+
}
32+
},
33+
"topologyType": "ReplicaSetWithPrimary",
34+
"logicalSessionTimeoutMinutes": null,
35+
"setName": "rs"
36+
}
37+
},
38+
{
39+
"description": "Post-4.2 NotMasterNoSlaveOk error marks server Unknown",
40+
"applicationErrors": [
41+
{
42+
"address": "a:27017",
43+
"when": "afterHandshakeCompletes",
44+
"maxWireVersion": 8,
45+
"type": "command",
46+
"response": {
47+
"ok": 0,
48+
"errmsg": "NotMasterNoSlaveOk",
49+
"code": 13435
50+
}
51+
}
52+
],
53+
"outcome": {
54+
"servers": {
55+
"a:27017": {
56+
"type": "Unknown",
57+
"topologyVersion": null,
58+
"pool": {
59+
"generation": 0
60+
}
61+
}
62+
},
63+
"topologyType": "ReplicaSetNoPrimary",
64+
"logicalSessionTimeoutMinutes": null,
65+
"setName": "rs"
66+
}
67+
}
68+
]
69+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"description": "Post-4.2 NotMasterOrSecondary error",
3+
"uri": "mongodb://a/?replicaSet=rs",
4+
"phases": [
5+
{
6+
"description": "Primary A is discovered",
7+
"responses": [
8+
[
9+
"a:27017",
10+
{
11+
"ok": 1,
12+
"ismaster": true,
13+
"hosts": [
14+
"a:27017"
15+
],
16+
"setName": "rs",
17+
"minWireVersion": 0,
18+
"maxWireVersion": 8
19+
}
20+
]
21+
],
22+
"outcome": {
23+
"servers": {
24+
"a:27017": {
25+
"type": "RSPrimary",
26+
"setName": "rs",
27+
"topologyVersion": null,
28+
"pool": {
29+
"generation": 0
30+
}
31+
}
32+
},
33+
"topologyType": "ReplicaSetWithPrimary",
34+
"logicalSessionTimeoutMinutes": null,
35+
"setName": "rs"
36+
}
37+
},
38+
{
39+
"description": "Post-4.2 NotMasterOrSecondary error marks server Unknown",
40+
"applicationErrors": [
41+
{
42+
"address": "a:27017",
43+
"when": "afterHandshakeCompletes",
44+
"maxWireVersion": 8,
45+
"type": "command",
46+
"response": {
47+
"ok": 0,
48+
"errmsg": "NotMasterOrSecondary",
49+
"code": 13436
50+
}
51+
}
52+
],
53+
"outcome": {
54+
"servers": {
55+
"a:27017": {
56+
"type": "Unknown",
57+
"topologyVersion": null,
58+
"pool": {
59+
"generation": 0
60+
}
61+
}
62+
},
63+
"topologyType": "ReplicaSetNoPrimary",
64+
"logicalSessionTimeoutMinutes": null,
65+
"setName": "rs"
66+
}
67+
}
68+
]
69+
}

0 commit comments

Comments
 (0)