DRIVERS-3181 fix timeouts in CSE custom endpoint test #1791
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Update Client-Side Encryption prose test
7. Custom Endpoint Test
to fix recently seen timeout failures:localhost
instead of AWS..invalid
instead of.local
for test URIs intended to be invalid.Tested in C driver: mongodb/mongo-c-driver#2001
Background & Motivation
Drivers have seen recent test failures due to timeout. Node indicates failure in Client-Side Encryption prose test:
7. Custom Endpoint Test
case 4. Drivers are expected to connect to a KMS using the endpoint string from mongocrypt_kms_ctx_endpoint, so this test seemed meaningful to ensure drivers are handling a custom port. To avoid the timeout to AWS, the test is updated to use the "kmip" provider (expected succeed withlocalhost:5698
) withlocalhost:12345
.Java logs before a timeout:
doesnotexist.local
is replaced withdoesnotexist.invalid
. Quoting RFC 2606:Tests were run in the C driver. Though tests were not previously failing, logs indicate the test was very slow. On a prior commit:
With this PR:
Related: drivers do not use a consistent timeout for KMS requests (see DRIVERS-1049). I expect this is why C did not fail, and other drivers did.
Please complete the following before merging:
[ ] Update changelog.[ ] Test these changes against all server versions and topologies (including standalone, replica set, sharded(N/A. Only changing KMS endpoint).clusters, and serverless).