Skip to content

Commit 5979e93

Browse files
authored
GODRIVER-3157 Skip Serverless Proxy test that requires failpoint on hello. (#1640)
1 parent b6a2bbb commit 5979e93

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

.evergreen/config.yml

+3
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,8 @@ functions:
560560
working_dir: src/go.mongodb.org/mongo-driver
561561
script: |
562562
${PREPARE_SHELL}
563+
564+
IS_SERVERLESS_PROXY="${IS_SERVERLESS_PROXY}" \
563565
bash etc/run-serverless-test.sh
564566
565567
run-atlas-data-lake-test:
@@ -2115,6 +2117,7 @@ axes:
21152117
display_name: "Serverless Proxy"
21162118
variables:
21172119
VAULT_NAME: "serverless_next"
2120+
IS_SERVERLESS_PROXY: "true"
21182121

21192122
task_groups:
21202123
- name: serverless_task_group

etc/run-serverless-test.sh

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ source ${DRIVERS_TOOLS}/.evergreen/serverless/secrets-export.sh
55
AUTH="auth" \
66
SSL="ssl" \
77
MONGODB_URI="${SERVERLESS_URI}" \
8+
IS_SERVERLESS_PROXY="${IS_SERVERLESS_PROXY}" \
89
SERVERLESS="serverless" \
910
MAKEFILE_TARGET=evg-test-serverless \
1011
sh ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh

mongo/integration/unified/unified_spec_runner.go

+13-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"context"
1111
"fmt"
1212
"io/ioutil"
13+
"os"
1314
"path"
1415
"strings"
1516
"testing"
@@ -23,7 +24,7 @@ import (
2324
)
2425

2526
var (
26-
skippedTestDescriptions = map[string]string{
27+
skippedTests = map[string]string{
2728
// GODRIVER-1773: This test runs a "find" with limit=4 and batchSize=3. It expects batchSize values of three for
2829
// the "find" and one for the "getMore", but we send three for both.
2930
"A successful find event with a getmore and the server kills the cursor (<= 4.4)": "See GODRIVER-1773",
@@ -68,6 +69,10 @@ var (
6869
"operation is retried multiple times for non-zero timeoutMS - aggregate on database": "maxTimeMS is disabled on find and aggregate. See DRIVERS-2722.",
6970
}
7071

72+
skippedServerlessProxyTests = map[string]string{
73+
"errors during the initial connection hello are ignored": "Serverless Proxy does not support failpoints on hello (see GODRIVER-3157)",
74+
}
75+
7176
logMessageValidatorTimeout = 10 * time.Millisecond
7277
lowHeartbeatFrequency = 50 * time.Millisecond
7378
)
@@ -248,8 +253,13 @@ func (tc *TestCase) Run(ls LoggerSkipper) error {
248253
if tc.SkipReason != nil {
249254
ls.Skipf("skipping for reason: %q", *tc.SkipReason)
250255
}
251-
if skipReason, ok := skippedTestDescriptions[tc.Description]; ok {
252-
ls.Skipf("skipping due to known failure: %v", skipReason)
256+
if skipReason, ok := skippedTests[tc.Description]; ok {
257+
ls.Skipf("skipping due to known failure: %q", skipReason)
258+
}
259+
// If we're running against a Serverless Proxy instance, also check the
260+
// tests that should be skipped only for Serverless Proxy.
261+
if skipReason, ok := skippedServerlessProxyTests[tc.Description]; ok && os.Getenv("IS_SERVERLESS_PROXY") == "true" {
262+
ls.Skipf("skipping due to known failure with Serverless Proxy: %q", skipReason)
253263
}
254264

255265
// Validate that we support the schema declared by the test file before attempting to use its contents.

testdata/load-balancers/sdam-error-handling.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"description": "state change errors are correctly handled",
3-
"schemaVersion": "1.3",
3+
"schemaVersion": "1.4",
44
"runOnRequirements": [
55
{
66
"topologies": [
@@ -260,7 +260,7 @@
260260
]
261261
},
262262
{
263-
"description": "errors during the initial connection hello are ignore",
263+
"description": "errors during the initial connection hello are ignored",
264264
"runOnRequirements": [
265265
{
266266
"minServerVersion": "4.9"

testdata/load-balancers/sdam-error-handling.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
description: state change errors are correctly handled
22

3-
schemaVersion: '1.3'
3+
schemaVersion: '1.4'
44

55
runOnRequirements:
66
- topologies: [ load-balanced ]
@@ -139,7 +139,7 @@ tests:
139139

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

0 commit comments

Comments
 (0)