quarkiverse / quarkus-wiremock

Quarkus extension for launching an in-process Wiremock server
https://wiremock.org/
Apache License 2.0
15 stars 8 forks source link

OutOfMemoryError when using @ConnectWireMock in tests #127

Open Tincoquesse opened 2 months ago

Tincoquesse commented 2 months ago

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

Tincoquesse commented 1 month ago

bump