mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8361827: [TESTBUG] serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java throws OutOfMemoryError
Reviewed-by: clanger, syan
This commit is contained in:
parent
6e368e0c69
commit
cbb3d23e19
@ -38,6 +38,7 @@ import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import com.sun.management.HotSpotDiagnosticMXBean;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@ -49,6 +50,15 @@ public class UnmountedVThreadNativeMethodAtTop {
|
||||
|
||||
boolean done;
|
||||
|
||||
/**
|
||||
* The tests accumulate previous heap dumps. Trigger GC before each test to get rid of them.
|
||||
* This makes dumps smaller, processing faster, and avoids OOMs
|
||||
*/
|
||||
@BeforeEach
|
||||
void doGC() {
|
||||
System.gc();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test dumping the heap while a virtual thread is blocked entering a synchronized native method.
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user