...

Text file src/go.mongodb.org/mongo-driver/testdata/connection-monitoring-and-pooling/pool-checkout-no-idle.yml

Documentation: go.mongodb.org/mongo-driver/testdata/connection-monitoring-and-pooling

     1version: 1
     2style: unit
     3description: must destroy and must not check out an idle connection if found while iterating available connections
     4poolOptions:
     5  maxIdleTimeMS: 10
     6  backgroundThreadIntervalMS: -1
     7operations:
     8  - name: ready
     9  - name: checkOut
    10    label: conn
    11  - name: checkIn
    12    connection: conn
    13  - name: wait
    14    ms: 50
    15  - name: checkOut
    16  - name: waitForEvent
    17    event: ConnectionCheckedOut
    18    count: 2
    19events:
    20  - type: ConnectionPoolCreated
    21    address: 42
    22    options: 42
    23  - type: ConnectionCheckedOut
    24    connectionId: 1
    25    address: 42
    26  - type: ConnectionCheckedIn
    27    connectionId: 1
    28    address: 42
    29  # In between these, wait so connection becomes idle
    30  - type: ConnectionClosed
    31    connectionId: 1
    32    reason: idle
    33    address: 42
    34  - type: ConnectionCheckedOut
    35    connectionId: 2
    36    address: 42
    37ignore:
    38  - ConnectionReady
    39  - ConnectionPoolReady
    40  - ConnectionCreated
    41  - ConnectionCheckOutStarted

View as plain text