diff --git a/test/hotspot/jtreg/containers/docker/TestJFREvents.java b/test/hotspot/jtreg/containers/docker/TestJFREvents.java index 19bbce1c5479c..4a5a4b6cc6ff6 100644 --- a/test/hotspot/jtreg/containers/docker/TestJFREvents.java +++ b/test/hotspot/jtreg/containers/docker/TestJFREvents.java @@ -221,6 +221,8 @@ private static void testSwapMemory(String memValueToSet, String swapValueToSet, commonDockerOpts() .addDockerOpts("--memory=" + memValueToSet) .addDockerOpts("--memory-swap=" + swapValueToSet) + //The default memory-swappiness vaule is inherited from the host machine, which maybe 0 + .addDockerOpts("--memory-swappiness=60") .addClassOptions("jdk.SwapSpace")); out.shouldHaveExitValue(0) .shouldContain("totalSize = " + expectedTotalValue)