Skip to content

Commit

Permalink
GODRIVER-3157 [master] Skip Serverless Proxy test that requires failp…
Browse files Browse the repository at this point in the history
…oint on hello. (#1641)

Co-authored-by: Matt Dale <[email protected]>
  • Loading branch information
blink1073 and matthewdale authored May 14, 2024
1 parent 0c2ae5d commit c0cec75
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,8 @@ functions:
working_dir: src/go.mongodb.org/mongo-driver
script: |
${PREPARE_SHELL}
IS_SERVERLESS_PROXY="${IS_SERVERLESS_PROXY}" \
bash etc/run-serverless-test.sh
run-atlas-data-lake-test:
Expand Down Expand Up @@ -2109,6 +2111,7 @@ axes:
display_name: "Serverless Proxy"
variables:
VAULT_NAME: "serverless_next"
IS_SERVERLESS_PROXY: "true"

task_groups:
- name: serverless_task_group
Expand Down
1 change: 1 addition & 0 deletions etc/run-serverless-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ source ${DRIVERS_TOOLS}/.evergreen/serverless/secrets-export.sh
AUTH="auth" \
SSL="ssl" \
MONGODB_URI="${SERVERLESS_URI}" \
IS_SERVERLESS_PROXY="${IS_SERVERLESS_PROXY}" \
SERVERLESS="serverless" \
MAKEFILE_TARGET=evg-test-serverless \
sh ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
16 changes: 13 additions & 3 deletions internal/integration/unified/unified_spec_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"context"
"fmt"
"io/ioutil"
"os"
"path"
"strings"
"testing"
Expand All @@ -23,7 +24,7 @@ import (
)

var (
skippedTestDescriptions = map[string]string{
skippedTests = map[string]string{
// GODRIVER-1773: This test runs a "find" with limit=4 and batchSize=3. It expects batchSize values of three for
// the "find" and one for the "getMore", but we send three for both.
"A successful find event with a getmore and the server kills the cursor (<= 4.4)": "See GODRIVER-1773",
Expand Down Expand Up @@ -56,6 +57,10 @@ var (
"unpin when a non-transaction read operation uses a session": "Implement GODRIVER-3034",
}

skippedServerlessProxyTests = map[string]string{
"errors during the initial connection hello are ignored": "Serverless Proxy does not support failpoints on hello (see GODRIVER-3157)",
}

logMessageValidatorTimeout = 10 * time.Millisecond
lowHeartbeatFrequency = 50 * time.Millisecond
)
Expand Down Expand Up @@ -245,8 +250,13 @@ func (tc *TestCase) Run(ls LoggerSkipper) error {
if tc.SkipReason != nil {
ls.Skipf("skipping for reason: %q", *tc.SkipReason)
}
if skipReason, ok := skippedTestDescriptions[tc.Description]; ok {
ls.Skipf("skipping due to known failure: %v", skipReason)
if skipReason, ok := skippedTests[tc.Description]; ok {
ls.Skipf("skipping due to known failure: %q", skipReason)
}
// If we're running against a Serverless Proxy instance, also check the
// tests that should be skipped only for Serverless Proxy.
if skipReason, ok := skippedServerlessProxyTests[tc.Description]; ok && os.Getenv("IS_SERVERLESS_PROXY") == "true" {
ls.Skipf("skipping due to known failure with Serverless Proxy: %q", skipReason)
}

// Validate that we support the schema declared by the test file before attempting to use its contents.
Expand Down
4 changes: 2 additions & 2 deletions testdata/load-balancers/sdam-error-handling.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"description": "state change errors are correctly handled",
"schemaVersion": "1.3",
"schemaVersion": "1.4",
"runOnRequirements": [
{
"topologies": [
Expand Down Expand Up @@ -260,7 +260,7 @@
]
},
{
"description": "errors during the initial connection hello are ignore",
"description": "errors during the initial connection hello are ignored",
"runOnRequirements": [
{
"minServerVersion": "4.9"
Expand Down
4 changes: 2 additions & 2 deletions testdata/load-balancers/sdam-error-handling.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
description: state change errors are correctly handled

schemaVersion: '1.3'
schemaVersion: '1.4'

runOnRequirements:
- topologies: [ load-balanced ]
Expand Down Expand Up @@ -139,7 +139,7 @@ tests:

# This test uses singleClient to ensure that connection attempts are routed
# to the same mongos on which the failpoint is set.
- description: errors during the initial connection hello are ignore
- description: errors during the initial connection hello are ignored
runOnRequirements:
# Server version 4.9+ is needed to set a fail point on the initial
# connection handshake with the appName filter due to SERVER-49336.
Expand Down

0 comments on commit c0cec75

Please sign in to comment.