Skip to content

Commit d6d43e7

Browse files
committed
fix tests
1 parent adc1375 commit d6d43e7

File tree

5 files changed

+23
-2
lines changed

5 files changed

+23
-2
lines changed

test/asynchronous/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ def __init__(self, address, options, is_sdam=False, client_id=None):
242242
self.opts = options
243243
self.operation_count = 0
244244
self.conns = []
245+
self.state = 0
245246

246247
def stale_generation(self, gen, service_id):
247248
return self.gen.stale(gen, service_id)

test/connection_logging/connection-logging.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,9 @@
713713
"durationMS": {
714714
"$$type": "int"
715715
},
716+
"attempt": {
717+
"$$type": "int"
718+
},
716719
"serverPort": {
717720
"$$type": [
718721
"int",

test/discovery_and_monitoring/unified/backoff-network-error.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,24 @@
132132
"arguments": {
133133
"client": "client",
134134
"event": {
135-
"poolBackoffEvent": {}
135+
"poolBackoffEvent": {
136+
"attempt": 1
137+
}
138+
},
139+
"count": 1
140+
}
141+
},
142+
{
143+
"name": "waitForEvent",
144+
"object": "testRunner",
145+
"arguments": {
146+
"client": "client",
147+
"event": {
148+
"poolBackoffEvent": {
149+
"attempt": 2
150+
}
136151
},
137-
"count": 2
152+
"count": 1
138153
}
139154
}
140155
],

test/unified_format_shared.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,7 @@ def match_event(self, expectation, actual):
622622
elif name == "poolBackoffEvent":
623623
self.test.assertIsInstance(actual, PoolBackoffEvent)
624624
self.test.assertIsInstance(actual.duration_ms, int)
625+
self.test.assertIsInstance(actual.attempt, int)
625626
elif name == "connectionCreatedEvent":
626627
self.test.assertIsInstance(actual, ConnectionCreatedEvent)
627628
elif name == "connectionReadyEvent":

test/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ def __init__(self, address, options, is_sdam=False, client_id=None):
240240
self.opts = options
241241
self.operation_count = 0
242242
self.conns = []
243+
self.state = 0
243244

244245
def stale_generation(self, gen, service_id):
245246
return self.gen.stale(gen, service_id)

0 commit comments

Comments
 (0)