...
1version: 1
2style: integration
3description: custom maxConnecting is enforced
4runOn:
5 -
6 minServerVersion: "4.4.0"
7failPoint:
8 configureFailPoint: failCommand
9 mode: "alwaysOn"
10 data:
11 failCommands: ["isMaster","hello"]
12 closeConnection: false
13 blockConnection: true
14 blockTimeMS: 500
15poolOptions:
16 maxConnecting: 1
17 # gives opportunity for the checkout in thread2 to establish a new connection, which it must not do until thread1 establishes one
18 maxPoolSize: 2
19 waitQueueTimeoutMS: 5000
20operations:
21 - name: ready
22 # thread1 exists to consume the single permit to open a connection,
23 # so that thread2 would be blocked acquiring a permit, which results in ordering its ConnectionCreated event after
24 # the ConnectionReady event from thread1.
25 - name: start
26 target: thread1
27 - name: start
28 target: thread2
29 - name: checkOut
30 thread: thread1
31 - name: waitForEvent
32 event: ConnectionCreated
33 count: 1
34 - name: checkOut
35 thread: thread2
36 - name: waitForEvent
37 event: ConnectionReady
38 count: 2
39events:
40 - type: ConnectionCreated
41 - type: ConnectionReady
42 - type: ConnectionCreated
43 - type: ConnectionReady
44ignore:
45 - ConnectionCheckOutStarted
46 - ConnectionCheckedIn
47 - ConnectionCheckedOut
48 - ConnectionClosed
49 - ConnectionPoolCreated
50 - ConnectionPoolReady
View as plain text