Skip to content

Commit

Permalink
8273318: Some containers/docker/TestJFREvents.java configs are runnin…
Browse files Browse the repository at this point in the history
…g out of memory

Backport-of: 7d24a3342129d4c71fad0d8d50d20758291d64b7
  • Loading branch information
shipilev committed Oct 4, 2021
1 parent b002cc9 commit 2a4b042
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/hotspot/jtreg/containers/docker/TestJFREvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,14 @@ public static void main(String[] args) throws Exception {
}

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

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

1 comment on commit 2a4b042

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.