Skip to content

test(NODE-6527): sync pool-checkout-returned-connection-maxConnecting tests #4344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
}
},
"poolOptions": {
"maxConnecting": 2,
"maxPoolSize": 10,
"waitQueueTimeoutMS": 5000
},
Expand Down Expand Up @@ -72,9 +73,8 @@
"connection": "conn0"
},
{
"name": "waitForEvent",
"event": "ConnectionCheckedOut",
"count": 4
"name": "wait",
"ms": 100
}
],
"events": [
Expand Down Expand Up @@ -104,14 +104,6 @@
"type": "ConnectionCheckedOut",
"connectionId": 1,
"address": 42
},
{
"type": "ConnectionCheckedOut",
"address": 42
},
{
"type": "ConnectionCheckedOut",
"address": 42
}
],
"ignore": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ failPoint:
blockConnection: true
blockTimeMS: 750
poolOptions:
maxConnecting: 2
maxPoolSize: 10
waitQueueTimeoutMS: 5000
operations:
Expand Down Expand Up @@ -45,14 +46,13 @@ operations:
count: 4
- name: wait
ms: 100
# check original connection back in, so the thread that isn't
# currently establishing will become unblocked. Then wait for
# all threads to complete.
# Check original connection back in, so one of the waiting threads can check
# out the idle connection before the two new connections are ready.
- name: checkIn
connection: conn0
- name: waitForEvent
event: ConnectionCheckedOut
count: 4
# Wait for 100ms to let one of the blocked checkOut operations complete.
- name: wait
ms: 100
events:
# main thread checking out a Connection and holding it
- type: ConnectionCreated
Expand All @@ -69,15 +69,13 @@ events:
- type: ConnectionCheckedIn
connectionId: 1
address: 42
# remaining thread checking out the returned Connection
# Another thread checks out the returned Connection before the two new
# connections are checked out.
- type: ConnectionCheckedOut
connectionId: 1
address: 42
# first two threads finishing Connection establishment
- type: ConnectionCheckedOut
address: 42
- type: ConnectionCheckedOut
address: 42
# Events after this can come in different orders but still be valid.
# See DRIVERS-2223 for details.
ignore:
- ConnectionPoolReady
- ConnectionClosed
Expand Down
Loading