File tree Expand file tree Collapse file tree 2 files changed +25
-25
lines changed
src/test/spec/json/connection-monitoring-and-pooling Expand file tree Collapse file tree 2 files changed +25
-25
lines changed Original file line number Diff line number Diff line change 3030 "name" : " start" ,
3131 "target" : " thread1"
3232 },
33- {
34- "name" : " checkOut" ,
35- "thread" : " thread1"
36- },
3733 {
3834 "name" : " start" ,
3935 "target" : " thread2"
4036 },
4137 {
42- "name" : " wait" ,
43- "thread" : " thread2" ,
44- "ms" : 100
38+ "name" : " start" ,
39+ "target" : " thread3"
4540 },
4641 {
4742 "name" : " checkOut" ,
48- "thread" : " thread2 "
43+ "thread" : " thread1 "
4944 },
5045 {
51- "name" : " start" ,
52- "target" : " thread3"
46+ "name" : " waitForEvent" ,
47+ "event" : " ConnectionCreated" ,
48+ "count" : 1
5349 },
5450 {
5551 "name" : " wait" ,
56- "thread" : " thread3" ,
5752 "ms" : 100
5853 },
54+ {
55+ "name" : " checkOut" ,
56+ "thread" : " thread2"
57+ },
5958 {
6059 "name" : " checkOut" ,
6160 "thread" : " thread3"
Original file line number Diff line number Diff line change @@ -18,29 +18,30 @@ poolOptions:
1818 maxPoolSize : 10
1919 waitQueueTimeoutMS : 5000
2020operations :
21- # start creating a Connection. This will take a while
22- # due to the fail point.
21+ # start 3 threads
2322 - name : start
2423 target : thread1
24+ - name : start
25+ target : thread2
26+ - name : start
27+ target : thread3
28+ # start creating a Connection. This will take a while
29+ # due to the fail point.
2530 - name : checkOut
2631 thread : thread1
27- # Start 2 new threads that wait for a little then try
28- # to check out connections. Only one thread should
32+ # wait for thread1 to actually start creating a Connection
33+ - name : waitForEvent
34+ event : ConnectionCreated
35+ count : 1
36+ # wait some more time to ensure thread1 has begun establishing a Connection
37+ - name : wait
38+ ms : 100
39+ # start 2 check out requests. Only one thread should
2940 # start creating a Connection and the other one should be
3041 # waiting for pendingConnectionCount to be less than maxConnecting,
3142 # only starting once thread1 finishes creating its Connection.
32- - name : start
33- target : thread2
34- - name : wait
35- thread : thread2
36- ms : 100
3743 - name : checkOut
3844 thread : thread2
39- - name : start
40- target : thread3
41- - name : wait
42- thread : thread3
43- ms : 100
4445 - name : checkOut
4546 thread : thread3
4647 # wait until all Connections have been created.
You can’t perform that action at this time.
0 commit comments