Closed sendaoYan closed 3 months ago
fix patch:
diff --git a/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java b/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java
index 08773b3e8b5..fdf6707b23f 100644
--- a/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java
+++ b/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java
@@ -73,11 +73,11 @@ private static void testMemoryFailCount() {
long count = Metrics.systemMetrics().getMemoryFailCount();
// Allocate 512M of data
- byte[][] bytes = new byte[64][];
+ byte[][] bytes = new byte[64 * 8 * 1024][];
boolean atLeastOneAllocationWorked = false;
- for (int i = 0; i < 64; i++) {
+ for (int i = 0; i < 64 * 8 * 1024; i++) {
try {
- bytes[i] = new byte[8 * 1024 * 1024];
+ bytes[i] = new byte[1024];
atLeastOneAllocationWorked = true;
// Break out as soon as we see an increase in failcount
// to avoid getting killed by the OOM killer.
test command(make sure docker service work correctly before test):
actual result:
jdk version and environment Infomation: