Skip to content

Commit b0f02ee

Browse files
authored
CSHARP-5046: Test that durations are included on relevant pool events (#1526)
1 parent 17a55f0 commit b0f02ee

19 files changed

+87
-31
lines changed

specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-checkin-make-available.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
{
2323
"type": "ConnectionCheckedOut",
2424
"connectionId": 1,
25-
"address": 42
25+
"address": 42,
26+
"duration": 42
2627
},
2728
{
2829
"type": "ConnectionCheckedIn",
@@ -32,7 +33,8 @@
3233
{
3334
"type": "ConnectionCheckedOut",
3435
"connectionId": 1,
35-
"address": 42
36+
"address": 42,
37+
"duration": 42
3638
}
3739
],
3840
"ignore": [

specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-checkin-make-available.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ events:
1212
- type: ConnectionCheckedOut
1313
connectionId: 1
1414
address: 42
15+
duration: 42
1516
- type: ConnectionCheckedIn
1617
connectionId: 1
1718
address: 42
1819
- type: ConnectionCheckedOut
1920
connectionId: 1
2021
address: 42
22+
duration: 42
2123
ignore:
2224
- ConnectionPoolCreated
2325
- ConnectionPoolReady

specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-checkout-connection.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323
{
2424
"type": "ConnectionReady",
2525
"connectionId": 1,
26-
"address": 42
26+
"address": 42,
27+
"duration": 42
2728
},
2829
{
2930
"type": "ConnectionCheckedOut",
3031
"connectionId": 1,
31-
"address": 42
32+
"address": 42,
33+
"duration": 42
3234
}
3335
],
3436
"ignore": [

specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-checkout-connection.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ events:
1313
- type: ConnectionReady
1414
connectionId: 1
1515
address: 42
16+
duration: 42
1617
- type: ConnectionCheckedOut
1718
connectionId: 1
1819
address: 42
20+
duration: 42
1921
ignore:
2022
- ConnectionPoolReady
2123
- ConnectionPoolCreated

specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-checkout-error-closed.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
{
3939
"type": "ConnectionCheckedOut",
4040
"address": 42,
41-
"connectionId": 42
41+
"connectionId": 42,
42+
"duration": 42
4243
},
4344
{
4445
"type": "ConnectionCheckedIn",
@@ -56,6 +57,7 @@
5657
{
5758
"type": "ConnectionCheckOutFailed",
5859
"address": 42,
60+
"duration": 42,
5961
"reason": "poolClosed"
6062
}
6163
],

specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-checkout-error-closed.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ events:
2121
- type: ConnectionCheckedOut
2222
address: 42
2323
connectionId: 42
24+
duration: 42
2425
- type: ConnectionCheckedIn
2526
address: 42
2627
connectionId: 42
@@ -30,6 +31,7 @@ events:
3031
address: 42
3132
- type: ConnectionCheckOutFailed
3233
address: 42
34+
duration: 42
3335
reason: poolClosed
3436
ignore:
3537
- ConnectionPoolReady

specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-checkout-maxConnecting-timeout.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@
8989
{
9090
"type": "ConnectionCheckOutFailed",
9191
"reason": "timeout",
92-
"address": 42
92+
"address": 42,
93+
"duration": 42
9394
}
9495
],
9596
"ignore": [

specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-checkout-maxConnecting-timeout.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ events:
6060
- type: ConnectionCheckOutFailed
6161
reason: timeout
6262
address: 42
63+
duration: 42
6364
ignore:
6465
- ConnectionCreated
6566
- ConnectionCheckedIn

specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-clear-clears-waitqueue.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@
5959
},
6060
{
6161
"type": "ConnectionCheckedOut",
62-
"address": 42
62+
"address": 42,
63+
"duration": 42
6364
},
6465
{
6566
"type": "ConnectionCheckOutStarted",
@@ -76,17 +77,20 @@
7677
{
7778
"type": "ConnectionCheckOutFailed",
7879
"reason": "connectionError",
79-
"address": 42
80+
"address": 42,
81+
"duration": 42
8082
},
8183
{
8284
"type": "ConnectionCheckOutFailed",
8385
"reason": "connectionError",
84-
"address": 42
86+
"address": 42,
87+
"duration": 42
8588
},
8689
{
8790
"type": "ConnectionCheckOutFailed",
8891
"reason": "connectionError",
89-
"address": 42
92+
"address": 42,
93+
"duration": 42
9094
}
9195
],
9296
"ignore": [

specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-clear-clears-waitqueue.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ events:
3838
address: 42
3939
- type: ConnectionCheckedOut
4040
address: 42
41+
duration: 42
4142
- type: ConnectionCheckOutStarted
4243
address: 42
4344
- type: ConnectionCheckOutStarted
@@ -47,12 +48,15 @@ events:
4748
- type: ConnectionCheckOutFailed
4849
reason: connectionError
4950
address: 42
51+
duration: 42
5052
- type: ConnectionCheckOutFailed
5153
reason: connectionError
5254
address: 42
55+
duration: 42
5356
- type: ConnectionCheckOutFailed
5457
reason: connectionError
5558
address: 42
59+
duration: 42
5660
ignore:
5761
- ConnectionPoolReady
5862
- ConnectionPoolCleared

0 commit comments

Comments
 (0)