Hi! I'm using WireMock standalone docker image to ...
# wiremock-java
m
Hi! I'm using WireMock standalone docker image to mock and verify my webhooks calls to external services. In my e2e test I'd like to verify that the data of our requests are correct so I'm fetching the requests from the admin endpoint. This got me thinking, what happens when we do load tests and the wiremock journaling gets a lot of requests? Is it possible to automatically clean it and for example only keep the last 100k requests or similar? I know I can manually do a reset call but I'd like to have this automatic and it should work for multiple people running tests at once.
l
There are a couple of options that allow you to control the request journal: `--no-request-journal`: Disable the request journal, which records incoming requests for later verification. This allows WireMock to be run (and serve stubs) for long periods (without resetting) without exhausting the heap. The
--record-mappings
option isn’t available if this one is specified. `--max-request-journal-entries`: Set maximum number of entries in request journal (if enabled). When this limit is reached oldest entries will be discarded. Looks like the
--max-request-journal-entries
is the one that will do what you want. All options documented here - https://wiremock.org/docs/standalone/java-jar/
🙌 1
m
Oh wow, what a thorough and good answer! I tried searching but did not manage to find this, thanks alot!
👍 1