diff --git a/src/test/spec/json/connection-monitoring-and-pooling/README.rst b/src/test/spec/json/connection-monitoring-and-pooling/README.rst index d8f873faa..4c80405e9 100644 --- a/src/test/spec/json/connection-monitoring-and-pooling/README.rst +++ b/src/test/spec/json/connection-monitoring-and-pooling/README.rst @@ -116,6 +116,8 @@ the addition of the following fields to each test: - ``failPoint``: optional, a document containing a ``configureFailPoint`` command to run against the endpoint being used for the test. +- ``poolOptions.appName`` (optional): appName attribute to be set in connections, which will be affected by the fail point. + Spec Test Match Function ======================== @@ -213,3 +215,4 @@ The following tests have not yet been automated, but MUST still be tested #. A user MUST be able to subscribe to Connection Monitoring Events in a manner idiomatic to their language and driver #. When a check out attempt fails because connection set up throws an error, assert that a ConnectionCheckOutFailedEvent with reason="connectionError" is emitted. + \ No newline at end of file diff --git a/src/test/spec/json/connection-monitoring-and-pooling/pool-create-min-size-error.json b/src/test/spec/json/connection-monitoring-and-pooling/pool-create-min-size-error.json index 4b655123d..1c744b850 100644 --- a/src/test/spec/json/connection-monitoring-and-pooling/pool-create-min-size-error.json +++ b/src/test/spec/json/connection-monitoring-and-pooling/pool-create-min-size-error.json @@ -4,7 +4,7 @@ "description": "error during minPoolSize population clears pool", "runOn": [ { - "minServerVersion": "4.2.0" + "minServerVersion": "4.9.0" } ], "failPoint": { @@ -14,13 +14,17 @@ }, "data": { "failCommands": [ - "isMaster" + "isMaster", + "hello" ], - "closeConnection": true + "closeConnection": true, + "appName": "poolCreateMinSizeErrorTest" } }, "poolOptions": { - "minPoolSize": 1 + "minPoolSize": 1, + "backgroundThreadIntervalMS": 50, + "appName": "poolCreateMinSizeErrorTest" }, "operations": [ { @@ -28,7 +32,7 @@ }, { "name": "waitForEvent", - "event": "ConnectionClosed", + "event": "ConnectionPoolCleared", "count": 1 }, { diff --git a/src/test/spec/json/connection-monitoring-and-pooling/pool-create-min-size-error.yml b/src/test/spec/json/connection-monitoring-and-pooling/pool-create-min-size-error.yml index 8bc4df2e2..dd5890b1d 100644 --- a/src/test/spec/json/connection-monitoring-and-pooling/pool-create-min-size-error.yml +++ b/src/test/spec/json/connection-monitoring-and-pooling/pool-create-min-size-error.yml @@ -3,21 +3,24 @@ style: integration description: error during minPoolSize population clears pool runOn: - - # required for blockConnection in fail point - minServerVersion: "4.2.0" + # required for appName in fail point + minServerVersion: "4.9.0" failPoint: configureFailPoint: failCommand # high amount to ensure not interfered with by monitor checks. mode: { times: 50 } data: - failCommands: ["isMaster"] + failCommands: ["isMaster","hello"] closeConnection: true + appName: "poolCreateMinSizeErrorTest" poolOptions: minPoolSize: 1 + backgroundThreadIntervalMS: 50 + appName: "poolCreateMinSizeErrorTest" operations: - name: ready - name: waitForEvent - event: ConnectionClosed + event: ConnectionPoolCleared count: 1 # ensure pool doesn't start making new connections - name: wait