Skip to content

Commit 2a4b042

Browse files
committed
8273318: Some containers/docker/TestJFREvents.java configs are running out of memory
Backport-of: 7d24a3342129d4c71fad0d8d50d20758291d64b7
1 parent b002cc9 commit 2a4b042

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test/hotspot/jtreg/containers/docker/TestJFREvents.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,14 @@ public static void main(String[] args) throws Exception {
8282
}
8383

8484
private static void containerInfoTestCase() throws Exception {
85-
// leave one CPU for system and tools, otherwise this test may be unstable
86-
int maxNrOfAvailableCpus = availableCPUs - 1;
87-
for (int i=1; i < maxNrOfAvailableCpus; i = i * 2) {
88-
for (int j=64; j <= 256; j *= 2) {
89-
testContainerInfo(i, j);
90-
}
85+
// Leave one CPU for system and tools, otherwise this test may be unstable.
86+
// Try the memory sizes that were verified by testMemory tests before.
87+
int maxNrOfAvailableCpus = availableCPUs - 1;
88+
for (int cpus = 1; cpus < maxNrOfAvailableCpus; cpus *= 2) {
89+
for (int mem : new int[]{ 200, 500, 1024 }) {
90+
testContainerInfo(cpus, mem);
9191
}
92+
}
9293
}
9394

9495
private static void testContainerInfo(int expectedCPUs, int expectedMemoryMB) throws Exception {

0 commit comments

Comments
 (0)