@@ -553,6 +553,42 @@ functions:
553553 KMS_MOCK_SERVERS_RUNNING : " true"
554554 args : [*task-runner, evg-test-kmip]
555555
556+ start-kms-failpoint-server :
557+ - command : ec2.assume_role
558+ params :
559+ role_arn : ${aws_test_secrets_role}
560+ - command : subprocess.exec
561+ params :
562+ working_dir : src/go.mongodb.org/mongo-driver
563+ binary : bash
564+ background : true
565+ include_expansions_in_env : ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN", "DRIVERS_TOOLS"]
566+ # This cannot use task because it will hang on Windows.
567+ args : [etc/setup-encryption.sh]
568+ - command : subprocess.exec
569+ params :
570+ binary : python3
571+ background : true
572+ args : ["-u", "${DRIVERS_TOOLS}/.evergreen/csfle/kms_failpoint_server.py", "--port", "9003"]
573+
574+ run-retry-kms-requests :
575+ - command : subprocess.exec
576+ type : test
577+ params :
578+ binary : " bash"
579+ env :
580+ GO_BUILD_TAGS : cse
581+ include_expansions_in_env : [AUTH, SSL, MONGODB_URI, TOPOLOGY,
582+ MONGO_GO_DRIVER_COMPRESSOR]
583+ args : [*task-runner, setup-test]
584+ - command : subprocess.exec
585+ type : test
586+ params :
587+ binary : " bash"
588+ env :
589+ KMS_FAILPOINT_SERVERS_RUNNING : " true"
590+ args : [*task-runner, evg-test-retry-kms-requests]
591+
556592 run-fuzz-tests :
557593 - command : subprocess.exec
558594 type : test
@@ -1486,6 +1522,21 @@ tasks:
14861522 AUTH : " noauth"
14871523 SSL : " nossl"
14881524
1525+ - name : " test-retry-kms-requests"
1526+ tags : ["retry-kms-requests"]
1527+ commands :
1528+ - func : bootstrap-mongo-orchestration
1529+ vars :
1530+ TOPOLOGY : " server"
1531+ AUTH : " noauth"
1532+ SSL : " nossl"
1533+ - func : start-kms-failpoint-server
1534+ - func : run-retry-kms-requests
1535+ vars :
1536+ TOPOLOGY : " server"
1537+ AUTH : " noauth"
1538+ SSL : " nossl"
1539+
14891540 - name : " test-serverless"
14901541 tags : ["serverless"]
14911542 commands :
@@ -2195,6 +2246,12 @@ buildvariants:
21952246 tasks :
21962247 - name : " .kms-kmip"
21972248
2249+ - matrix_name : " retry-kms-requests-test"
2250+ matrix_spec : { version: ["7.0"], os-ssl-40: ["rhel87-64"] }
2251+ display_name : " Retry KMS Requests ${os-ssl-40}"
2252+ tasks :
2253+ - name : " .retry-kms-requests"
2254+
21982255 - matrix_name : " fuzz-test"
21992256 matrix_spec : { version: ["5.0"], os-ssl-40: ["rhel87-64"] }
22002257 display_name : " Fuzz ${version} ${os-ssl-40}"
0 commit comments