-
Notifications
You must be signed in to change notification settings - Fork 634
test(middleware-flexible-checksums): retry reuses the computed checksum #7277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Integration test still fails in dry run FAIL packages/middleware-flexible-checksums/src/middleware-flexible-checksums.retry.integ.spec.ts > middleware-flexible-checksums.retry > retry reuses the checksum
AssertionError: expected +0 to deeply equal 1
- Expected
+ Received
- 1
+ 0
❯ packages/middleware-flexible-checksums/src/middleware-flexible-checksums.retry.integ.spec.ts:57:29
55|
56| // Validate that flexibleChecksumsMiddleware is called once.
57| expect(flexChecksCalls).toEqual(1);
| ^
58| // Validate that retryMiddleware is called maxAttempts times.
59| expect(retryMiddlewareCalls).toEqual(maxAttempts);
|
After putting a bunch of debug statements, it appears like middleware are added in the stack in dry run, but they're not called Logs show stack on resolve with anonymous middleware after the ones we want to count [
'loggerMiddleware - initialize',
'validateBucketNameMiddleware - initialize',
'regionRedirectMiddleware - initialize',
'ssecMiddleware - initialize',
'httpAuthSchemeMiddleware - serialize',
'regionRedirectEndpointMiddleware - before endpointV2Middleware',
'endpointV2Middleware - serialize',
'bucketEndpointMiddleware - after endpointV2Middleware',
'flexibleChecksumsInputMiddleware - before serializerMiddleware',
'serializerMiddleware - serialize',
'contentLengthMiddleware - build',
'addExpectContinueMiddleware - build',
's3ExpressMiddleware - build',
'flexibleChecksumsMiddleware - build',
'anonymous - after flexibleChecksumsMiddleware',
'getUserAgentMiddleware - build',
'hostHeaderMiddleware - build',
'recursionDetectionMiddleware - build',
'retryMiddleware - finalizeRequest',
'anonymous - after retryMiddleware',
'httpSigningMiddleware (a.k.a. apiKeyMiddleware,tokenMiddleware,awsAuthMiddleware) - finalizeRequest',
'getCheckContentLengthHeaderPlugin - finalizeRequest',
'deserializerMiddleware - deserialize',
'throw200ExceptionsMiddleware - after deserializerMiddleware',
'flexibleChecksumsResponseMiddleware - after deserializerMiddleware'
] And the log shows that error is thrown after three attempts
But it doesn't print the logging statements:
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Issue
Description
Adds an integration test which confirms checksum is not recomputed on retries
Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.