-
Notifications
You must be signed in to change notification settings - Fork 168
test: remote requests are now replayed #1941
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
base: main
Are you sure you want to change the base?
Conversation
7a5e2fd
to
f22ede9
Compare
Converted to draft because there are still some things not quite right. |
f22ede9
to
fafd935
Compare
bf7d43e
to
fb21e82
Compare
It works, but now the build fails with an OOM exception during the unit tests :-/ |
why does it need more memory?? |
I'm guessing because it keeps the requests in memory? Not sure. It doesn't seem that much traffic. |
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 :) |
The current trigger was indeed this blusky issue :-) |
fb21e82
to
dfd718c
Compare
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. |
fca7851
to
762f5ca
Compare
In the end Hoverfly came with its own set of problems so went back to making WireMock work and it seems I was successful. |
@maxandersen we should really take a look at merging this, see how often the CI actions fail for example here: #1991 @wfouche had to ask me several times to restart the build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, missed the update. marking as approved and merge when test passes
@quintesse any idea of why this is failing with timeout in tests? |
It's not timeouts , it's OOM again. It didn't happen the last couple of times so I didn't make any changes in that respect, but I do have some ideas on how to fix it. (Basically all requests and their results are kept in memory by WireMock once you initialize it. And because I initialize it at the start of the first test until the last test finishes we might be storing a lot of data in memory. I think I can fix this by simply limiting its "scope", for example to init for each test class, perhaps even for each test. I'll have to see if that slows things down or not) |
Marking as Draft for now until I have some time to look at it. |
f46363f
to
215df63
Compare
Ok, so I again took a look at what was happening and it's basically because some tests cause relatively big downloads. The new Kotlin Export test causes a 80MB download! Which WireMock chokes on. Now while investigating what I could do about that I realized that I'm probably trying to do too much with WireMock, like trying to shove a block into a round hole. Given the fact that I;m only using it as a proxy that writes its requests to disk to be replayed at a later time, I'm seriously considering just writing that myself. It seems easy (famous last words). Edit: btw, I'm going to fix those exports, they shouldn't be downloading anything. |
81b14d4
to
ab2c985
Compare
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.
ab2c985
to
2086ad0
Compare
2086ad0
to
7a78e9c
Compare
This way we don't rely on external services being up or being rate limtied.