-
Notifications
You must be signed in to change notification settings - Fork 914
Use mock HTTP clients in timeout tests #3983
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
Do you have any data on how reliable the mock clients are compared to wiremock, ie did you do any repeated tests before/after the code change and could see a measurable difference? |
...c/test/java/software/amazon/awssdk/protocol/tests/timeout/BaseApiCallAttemptTimeoutTest.java
Show resolved
Hide resolved
From my observation, wiremock severs sometimes don't honor the configured fixed delay, i.e., it would return the response much later after the configured delay. Mock HTTP clients are written by us, so it's guaranteed it'll return after the configured delay. The tests are only flaky in CodeBuild environments, so I'm not able to compare them locally. |
...ocol-tests/src/test/java/software/amazon/awssdk/protocol/tests/util/MockAsyncHttpClient.java
Outdated
Show resolved
Hide resolved
...t-utils/src/main/java/software/amazon/awssdk/testutils/service/http/MockAsyncHttpClient.java
Show resolved
Hide resolved
...t-utils/src/main/java/software/amazon/awssdk/testutils/service/http/MockAsyncHttpClient.java
Outdated
Show resolved
Hide resolved
...c/test/java/software/amazon/awssdk/protocol/tests/timeout/BaseApiCallAttemptTimeoutTest.java
Outdated
Show resolved
Hide resolved
SonarCloud Quality Gate failed. |
Motivation and Context
Wiremock is not reliable in timeout tests
Modifications
Use mock HTTP clients in timeout tests