description: backpressure-server-description-unchanged-on-min-pool-size-population-error
schemaVersion: "1.17"
runOnRequirements:
  - minServerVersion: "4.4"
    serverless: forbid
    topologies:
      - single
createEntities:
  - client:
      id: setupClient
      useMultipleMongoses: false
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:
          entities:
            - client:
                id: client
                observeEvents:
                  - serverDescriptionChangedEvent
                  - connectionClosedEvent
                uriOptions:
                  appname: authErrorTest
                  minPoolSize: 5
                  maxConnecting: 1
                  serverMonitoringMode: poll
                  heartbeatFrequencyMS: 1000000
      - name: waitForEvent
        object: testRunner
        arguments:
          client: client
          event:
            serverDescriptionChangedEvent: {}
          count: 1
      - name: waitForEvent
        object: testRunner
        arguments:
          client: client
          event:
            connectionClosedEvent: {}
          count: 1
    expectEvents:
      - client: client
        eventType: sdam
        events:
          - serverDescriptionChangedEvent: {}
