Skip to content
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

test: remote requests are now replayed #1941

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

quintesse
Copy link
Contributor

This way we don't rely on external services being up or being rate limtied.

@quintesse quintesse requested a review from maxandersen March 6, 2025 16:45
@quintesse quintesse marked this pull request as draft March 7, 2025 10:21
@quintesse
Copy link
Contributor Author

Converted to draft because there are still some things not quite right.

@quintesse quintesse changed the title test: stub Gist (and other) tests test: remote requests are now replayed Mar 7, 2025
@quintesse quintesse force-pushed the test_http_stubs branch 2 times, most recently from bf7d43e to fb21e82 Compare March 7, 2025 23:02
@quintesse
Copy link
Contributor Author

It works, but now the build fails with an OOM exception during the unit tests :-/
I'd need to figure out if we can give the test runner some more memory in the GH action.

@maxandersen
Copy link
Collaborator

why does it need more memory??

@quintesse
Copy link
Contributor Author

I'm guessing because it keeps the requests in memory? Not sure. It doesn't seem that much traffic.

@maxandersen
Copy link
Collaborator

fyi: i fixed the blusky issue - for some reason it kept giving my user invalid handle causing blusky url not to work.

still this pr has merits to explore - just wondered if the trigger was the random blusky errors :)

@quintesse
Copy link
Contributor Author

still this pr has merits to explore - just wondered if the trigger was the random blusky errors :)

The current trigger was indeed this blusky issue :-)
But it had been bothering me for the longest time that the CI randomly fails because of connection errors, server problems, rate limits, etc

@quintesse
Copy link
Contributor Author

I'm not really happy with how WireMock handles record/replay of requests, I'm going to try to see if switching to Hoverfly is a better option.

Instead of hitting remote servers and possibly getting failed
tests becauase servers are down or becuase wer're getting rate
limited, we now record the responses and replay them.
PS: This is not done for Maven artifacts/MIMA.
@quintesse
Copy link
Contributor Author

In the end Hoverfly came with its own set of problems so went back to making WireMock work and it seems I was successful.

@quintesse quintesse marked this pull request as ready for review March 26, 2025 21:34
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