Skip to content

GODRIVER-3157 Skip Serverless Proxy test that requires failpoint on hello. #1640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2024
Merged
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
3 changes: 3 additions & 0 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,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 @@ -2115,6 +2117,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 mongo/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 @@ -68,6 +69,10 @@ var (
"operation is retried multiple times for non-zero timeoutMS - aggregate on database": "maxTimeMS is disabled on find and aggregate. See DRIVERS-2722.",
}

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 @@ -248,8 +253,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
Loading