Skip to content
Advertisement

How can I collect a heap dump from Gradle tests in a Spring Boot Application?

I trying to diagnose a memory leak while running my integration tests in my Spring Boot App.

When I am running :

JavaScript

I keep getting OOM errors:

JavaScript

But no heap dump in the specified directory.

I have also tried adding the following to my gradle.properties:

JavaScript

No change.

What am I doing wrong ?

How can I collect the heap dumps of the gradle test ?

Advertisement

Answer

Add the following in the build.gradle file

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement