quarkiverse/quarkus-wiremock

OutOfMemoryError when using @ConnectWireMock in tests

Closed this issue · 10 comments

Regarding documentation -> https://docs.quarkiverse.io/quarkus-wiremock/dev/index.html

we use wiremock with @ConnectWireMock annotation on open base class (kotlin) from which test classes inherit. With more tests fired, we get “OutOfMemoryError: Java heap space”.
Screenshot 2024-04-26 at 16 18 40

The problem does not occur if we use QuarkusTestResourceLifecycleManager & @QuarkusTestResource on each class.
Perhaps there is something we forgot about regarding the configuration.

I have prepared a reproducer that illustrates the drastic drop in performance of gradle check between these two approaches.
On the 'main' branch: @ConnectWireMock, on 'with-lifecycle-manager' branch: @QuarkusTestResource -> https://github.com/Tincoquesse/quarkus-wiremock-oom-reproducer

We use the following version of Wiremock:
Screenshot 2024-04-26 at 16 10 14

Quarkus 3.9.1
Gradle 8.6
Java 21

@chberger This is being labeled as stale.

Not stale

We have the same problem with Quarkus 3.12.1, Gradle 8.8 and Java 17. This bug is blocking us to use this extension.

@chberger This is being labeled as stale.

@chberger This is being closed due to inactivity.

@Tincoquesse Apologies for the delayed response. Are you still able to reproduce the issue with the latest version of the extension (1.40)? If so, I'll investigate it as soon as possible.

hello @chberger
@Tincoquesse was working with me, but changed companies, I will take over and try to support next week :)

@chberger reproducer is not failing for now. So I would close it and we will try at some point revert quarkiverse version to real projects, so we will inform again if problem will arive.

All right, thanks for your feedback!