Skip to content

Commit 21e958f

Browse files
committed
add task
1 parent 02a60a5 commit 21e958f

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed

.evergreen/config.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,31 @@ functions:
553553
KMS_MOCK_SERVERS_RUNNING: "true"
554554
args: [*task-runner, evg-test-kmip]
555555

556+
start-kms-failpoint-server:
557+
- command: subprocess.exec
558+
params:
559+
binary: python3
560+
background: true
561+
args: ["-u", "${DRIVERS_TOOLS}/.evergreen/csfle/kms_failpoint_server.py", "--port", "9003"]
562+
563+
run-retry-kms-requests:
564+
- command: subprocess.exec
565+
type: test
566+
params:
567+
binary: "bash"
568+
env:
569+
GO_BUILD_TAGS: cse
570+
include_expansions_in_env: [AUTH, SSL, MONGODB_URI, TOPOLOGY,
571+
MONGO_GO_DRIVER_COMPRESSOR]
572+
args: [*task-runner, setup-test]
573+
- command: subprocess.exec
574+
type: test
575+
params:
576+
binary: "bash"
577+
env:
578+
KMS_FAILPOINT_SERVERS_RUNNING: "true"
579+
args: [*task-runner, evg-test-retry-kms-requests]
580+
556581
run-fuzz-tests:
557582
- command: subprocess.exec
558583
type: test
@@ -1486,6 +1511,21 @@ tasks:
14861511
AUTH: "noauth"
14871512
SSL: "nossl"
14881513

1514+
- name: "test-retry-kms-requests"
1515+
tags: ["retry-kms-requests"]
1516+
commands:
1517+
- func: bootstrap-mongo-orchestration
1518+
vars:
1519+
TOPOLOGY: "server"
1520+
AUTH: "noauth"
1521+
SSL: "nossl"
1522+
- func: start-kms-failpoint-server
1523+
- func: run-retry-kms-requests
1524+
vars:
1525+
TOPOLOGY: "server"
1526+
AUTH: "noauth"
1527+
SSL: "nossl"
1528+
14891529
- name: "test-serverless"
14901530
tags: ["serverless"]
14911531
commands:

Taskfile.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ tasks:
141141
evg-test-kms:
142142
- go test -exec "env PKG_CONFIG_PATH=${PKG_CONFIG_PATH} LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" ${BUILD_TAGS} -v -timeout {{.TEST_TIMEOUT}}s ./internal/integration -run TestClientSideEncryptionProse/kms_tls_tests >> test.suite
143143

144+
evg-test-retry-kms-requests:
145+
- go test -exec "env PKG_CONFIG_PATH=${PKG_CONFIG_PATH} LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" ${BUILD_TAGS} -v -timeout {{.TEST_TIMEOUT}}s ./internal/integration -run TestClientSideEncryptionProse/kms_retry_tests >> test.suite
146+
144147
evg-test-load-balancers:
145148
# Load balancer should be tested with all unified tests as well as tests in the following
146149
# components: retryable reads, retryable writes, change streams, initial DNS seedlist discovery.

internal/integration/client_side_encryption_prose_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2983,7 +2983,12 @@ func TestClientSideEncryptionProse(t *testing.T) {
29832983
})
29842984
})
29852985

2986-
mt.RunOpts("24. KMS Retry Tests", qeRunOpts22, func(mt *mtest.T) {
2986+
mt.RunOpts("24. kms retry tests", qeRunOpts22, func(mt *mtest.T) {
2987+
kmsTlsTestcase := os.Getenv("KMS_FAILPOINT_SERVERS_RUNNING")
2988+
if kmsTlsTestcase == "" {
2989+
mt.Skipf("Skipping test as KMS_FAILPOINT_SERVERS_RUNNING is not set")
2990+
}
2991+
29872992
setFailPoint := func(failure string, count int) error {
29882993
url := fmt.Sprintf("https://localhost:9003/set_failpoint/%s", failure)
29892994
var payloadBuf bytes.Buffer

0 commit comments

Comments
 (0)