Skip to content
Draft
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 @@ -22,6 +22,27 @@
{
"description": "the server description is not changed on handshake error during minPoolSize population",
"operations": [
{
"name": "failPoint",
"object": "testRunner",
"arguments": {
"client": "setupClient",
"failPoint": {
"configureFailPoint": "failCommand",
"mode": {
"skip": 1
},
"data": {
"failCommands": [
"hello",
"isMaster"
],
"appName": "authErrorTest",
"closeConnection": true
}
}
}
},
{
"name": "createEntities",
"object": "testRunner",
Expand All @@ -46,27 +67,6 @@
]
}
},
{
"name": "failPoint",
"object": "testRunner",
"arguments": {
"client": "setupClient",
"failPoint": {
"configureFailPoint": "failCommand",
"mode": {
"skip": 1
},
"data": {
"failCommands": [
"hello",
"isMaster"
],
"appName": "authErrorTest",
"closeConnection": true
}
}
}
},
{
"name": "waitForEvent",
"object": "testRunner",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ createEntities:
tests:
- description: the server description is not changed on handshake error during minPoolSize population
operations:
- name: failPoint
object: testRunner
arguments:
client: setupClient
failPoint:
configureFailPoint: failCommand
mode:
skip: 1
data:
failCommands:
- hello
- isMaster
appName: authErrorTest
closeConnection: true
- name: createEntities
object: testRunner
arguments:
Expand All @@ -27,20 +41,6 @@ tests:
maxConnecting: 1
serverMonitoringMode: poll
heartbeatFrequencyMS: 1000000
- name: failPoint
object: testRunner
arguments:
client: setupClient
failPoint:
configureFailPoint: failCommand
mode:
skip: 1
data:
failCommands:
- hello
- isMaster
appName: authErrorTest
closeConnection: true
- name: waitForEvent
object: testRunner
arguments:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"schemaVersion": "1.4",
"runOnRequirements": [
{
"minServerVersion": "4.9",
"minServerVersion": "4.4.7",
"serverless": "forbid",
"topologies": [
"single"
Expand All @@ -27,7 +27,7 @@
],
"tests": [
{
"description": "Network error on minPoolSize background creation",
"description": "Server error on minPoolSize background creation",
"operations": [
{
"name": "failPoint",
Expand All @@ -45,7 +45,7 @@
"isMaster"
],
"appName": "SDAMminPoolSizeError",
"closeConnection": true
"errorCode": 91
}
}
}
Expand All @@ -68,6 +68,7 @@
"heartbeatFrequencyMS": 10000,
"appname": "SDAMminPoolSizeError",
"minPoolSize": 10,
"serverMonitoringMode": "poll",
"serverSelectionTimeoutMS": 1000
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: minPoolSize-error
schemaVersion: "1.4"

runOnRequirements:
# failCommand appName requirements
- minServerVersion: "4.9"
# Require SERVER-49336 for failCommand + appName on the initial handshake.
- minServerVersion: "4.4.7"
serverless: forbid
topologies:
- single
Expand All @@ -21,7 +21,7 @@ initialData: &initialData
documents: []

tests:
- description: Network error on minPoolSize background creation
- description: Server error on minPoolSize background creation
operations:
# Configure the initial monitor handshake to succeed but the
# first or second background minPoolSize establishments to fail.
Expand All @@ -38,7 +38,7 @@ tests:
- hello
- isMaster
appName: SDAMminPoolSizeError
closeConnection: true
errorCode: 91
- name: createEntities
object: testRunner
arguments:
Expand All @@ -54,6 +54,7 @@ tests:
heartbeatFrequencyMS: 10000
appname: SDAMminPoolSizeError
minPoolSize: 10
serverMonitoringMode: poll
serverSelectionTimeoutMS: 1000
- database:
id: &database database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"client": {
"id": "client",
"observeEvents": [
"connectionCreatedEvent",
"poolReadyEvent",
"poolClearedEvent",
"connectionClosedEvent"
],
Expand All @@ -69,6 +69,17 @@
]
}
},
{
"name": "waitForEvent",
"object": "testRunner",
"arguments": {
"client": "client",
"event": {
"poolReadyEvent": {}
},
"count": 1
}
},
{
"name": "waitForEvent",
"object": "testRunner",
Expand All @@ -91,22 +102,89 @@
"count": 1
}
}
],
"expectEvents": [
]
},
{
"description": "Pool is not cleared on handshake error during minPoolSize population",
"operations": [
{
"name": "failPoint",
"object": "testRunner",
"arguments": {
"client": "setupClient",
"failPoint": {
"configureFailPoint": "failCommand",
"mode": {
"skip": 1
},
"data": {
"failCommands": [
"hello",
"isMaster"
],
"appName": "authErrorTest",
"closeConnection": true
}
}
}
},
{
"name": "createEntities",
"object": "testRunner",
"arguments": {
"entities": [
{
"client": {
"id": "client",
"observeEvents": [
"poolReadyEvent",
"poolClearedEvent",
"connectionClosedEvent"
],
"uriOptions": {
"appname": "authErrorTest",
"minPoolSize": 5,
"maxConnecting": 1,
"serverMonitoringMode": "poll",
"heartbeatFrequencyMS": 1000000
}
}
}
]
}
},
{
"client": "client",
"eventType": "cmap",
"events": [
{
"connectionCreatedEvent": {}
"name": "waitForEvent",
"object": "testRunner",
"arguments": {
"client": "client",
"event": {
"poolReadyEvent": {}
},
{
"count": 1
}
},
{
"name": "waitForEvent",
"object": "testRunner",
"arguments": {
"client": "client",
"event": {
"connectionClosedEvent": {}
},
"count": 1
}
},
{
"name": "assertEventCount",
"object": "testRunner",
"arguments": {
"client": "client",
"event": {
"poolClearedEvent": {}
},
{
"connectionClosedEvent": {}
}
]
"count": 0
}
}
]
}
Expand Down
Loading