Skip to content

Commit 83b903e

Browse files
committed
PYTHON-5675 Fix Backpressure-related racy tests
1 parent 88f05fa commit 83b903e

File tree

5 files changed

+27
-26
lines changed

5 files changed

+27
-26
lines changed

test/asynchronous/test_discovery_and_monitoring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ async def mock_close(self, reason):
457457

458458

459459
class TestPoolBackpressure(AsyncIntegrationTest):
460-
@async_client_context.require_version_min(7, 0, 0)
460+
@async_client_context.require_version_min(8, 0, 12)
461461
async def test_connection_pool_is_not_cleared(self):
462462
listener = CMAPListener()
463463

test/discovery_and_monitoring/unified/backpressure-server-description-unchanged-on-min-pool-size-population-error.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,27 @@
2222
{
2323
"description": "the server description is not changed on handshake error during minPoolSize population",
2424
"operations": [
25+
{
26+
"name": "failPoint",
27+
"object": "testRunner",
28+
"arguments": {
29+
"client": "setupClient",
30+
"failPoint": {
31+
"configureFailPoint": "failCommand",
32+
"mode": {
33+
"skip": 1
34+
},
35+
"data": {
36+
"failCommands": [
37+
"hello",
38+
"isMaster"
39+
],
40+
"appName": "authErrorTest",
41+
"closeConnection": true
42+
}
43+
}
44+
}
45+
},
2546
{
2647
"name": "createEntities",
2748
"object": "testRunner",
@@ -46,27 +67,6 @@
4667
]
4768
}
4869
},
49-
{
50-
"name": "failPoint",
51-
"object": "testRunner",
52-
"arguments": {
53-
"client": "setupClient",
54-
"failPoint": {
55-
"configureFailPoint": "failCommand",
56-
"mode": {
57-
"skip": 1
58-
},
59-
"data": {
60-
"failCommands": [
61-
"hello",
62-
"isMaster"
63-
],
64-
"appName": "authErrorTest",
65-
"closeConnection": true
66-
}
67-
}
68-
}
69-
},
7070
{
7171
"name": "waitForEvent",
7272
"object": "testRunner",

test/discovery_and_monitoring/unified/minPoolSize-error.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
],
2828
"tests": [
2929
{
30-
"description": "Network error on minPoolSize background creation",
30+
"description": "Server error on minPoolSize background creation",
3131
"operations": [
3232
{
3333
"name": "failPoint",
@@ -45,7 +45,7 @@
4545
"isMaster"
4646
],
4747
"appName": "SDAMminPoolSizeError",
48-
"closeConnection": true
48+
"errorCode": 91
4949
}
5050
}
5151
}

test/discovery_and_monitoring/unified/serverMonitoringMode.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
{
66
"topologies": [
77
"single",
8-
"sharded"
8+
"sharded",
9+
"sharded-replicaset"
910
],
1011
"serverless": "forbid"
1112
}

test/test_discovery_and_monitoring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ def mock_close(self, reason):
455455

456456

457457
class TestPoolBackpressure(IntegrationTest):
458-
@client_context.require_version_min(7, 0, 0)
458+
@client_context.require_version_min(8, 0, 12)
459459
def test_connection_pool_is_not_cleared(self):
460460
listener = CMAPListener()
461461

0 commit comments

Comments
 (0)