Skip to content

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

Merged
merged 3 commits into from
May 9, 2023
Merged

Conversation

zoewangg
Copy link
Contributor

@zoewangg zoewangg commented May 9, 2023

Motivation and Context

Wiremock is not reliable in timeout tests

Modifications

Use mock HTTP clients in timeout tests

@zoewangg zoewangg requested a review from a team as a code owner May 9, 2023 16:57
@cenedhryn
Copy link
Contributor

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?

@zoewangg
Copy link
Contributor Author

zoewangg commented May 9, 2023

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?

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.

@zoewangg zoewangg enabled auto-merge (squash) May 9, 2023 19:55
@zoewangg zoewangg merged commit cf9640b into master May 9, 2023
@sonarqubecloud
Copy link

sonarqubecloud bot commented May 9, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 9 Code Smells

0.0% 0.0% Coverage
6.9% 6.9% Duplication

@zoewangg zoewangg deleted the zoewang/apiCallTimeoutTests branch June 15, 2023 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants