Skip to content

Commit 4cb5326

Browse files
mdb-adkevinAlbs
andauthored
Apply suggestions from code review
Co-authored-by: Kevin Albertson <[email protected]>
1 parent f615153 commit 4cb5326

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
HTTP/1.1 200 OK
22
x-amzn-RequestId: deeb35e5-4ecb-4bf1-9af5-84a54ff0af0e
3-
Content-Type: appli
3+
Content-Type: application/x-amz-json-1.1
4+
Content-Length: 446
5+
Connection: close
6+
7+
{"KeyId": "arn:aws:k

test/test-mongocrypt-datakey.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -495,10 +495,9 @@ static void _test_create_datakey_with_retry(_mongocrypt_tester_t *tester) {
495495
ASSERT_OK(kms_ctx, ctx);
496496
// Expect no sleep is requested before any error.
497497
ASSERT_CMPINT64(mongocrypt_kms_ctx_usleep(kms_ctx), ==, 0);
498-
// Feed part of a response
499-
ASSERT_OK(mongocrypt_kms_ctx_feed(kms_ctx, TEST_FILE("./test/data/kms-aws/encrypt-response-partial.txt")),
500-
kms_ctx);
501-
// Assume a network error and reset the context.
498+
// Mark a network error.
499+
ASSERT_OK(mongocrypt_kms_ctx_fail(kms_ctx), kms_ctx);
500+
// Reset the context.
502501
mongocrypt_kms_ctx_reset(kms_ctx);
503502
// Feed a successful response.
504503
ASSERT_OK(mongocrypt_kms_ctx_feed(kms_ctx, TEST_FILE("./test/data/kms-aws/encrypt-response.txt")), kms_ctx);

0 commit comments

Comments
 (0)