From cd582fa380a31a9220ce18606fa2fc255d39fbdb Mon Sep 17 00:00:00 2001 From: Michail Chernov Date: Thu, 15 Jan 2015 19:16:17 +0400 Subject: [PATCH] 8066122: CollectionUsageThreshold.java times out when run with -XX:+ExplicitGCInvokesConcurrent CollectionUsageThreshold.java hangs due to VM performs concurrent GC with -XX:+ExplicitGCInvokesConcurrent flag, as result - notification is not received. Excluded test execution with -XX:+ExplicitGCInvokesConcurrent. Reviewed-by: dfazunen, tschatzl --- .../lang/management/MemoryMXBean/CollectionUsageThreshold.java | 3 ++- jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest.java | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/jdk/test/java/lang/management/MemoryMXBean/CollectionUsageThreshold.java b/jdk/test/java/lang/management/MemoryMXBean/CollectionUsageThreshold.java index 64224d23306..74e06e6aa6e 100644 --- a/jdk/test/java/lang/management/MemoryMXBean/CollectionUsageThreshold.java +++ b/jdk/test/java/lang/management/MemoryMXBean/CollectionUsageThreshold.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,6 +32,7 @@ * * @library /lib/testlibrary/ * @build jdk.testlibrary.* CollectionUsageThreshold MemoryUtil RunUtil + * @requires vm.opt.ExplicitGCInvokesConcurrent == "false" | vm.opt.ExplicitGCInvokesConcurrent == "null" * @run main/timeout=300 CollectionUsageThreshold */ diff --git a/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest.java b/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest.java index 6bf2e8f1ee2..e0d30f0e3c8 100644 --- a/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest.java +++ b/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest.java @@ -32,6 +32,7 @@ * * @library /lib/testlibrary/ * @build jdk.testlibrary.* LowMemoryTest MemoryUtil RunUtil + * @requires vm.opt.ExplicitGCInvokesConcurrent == "false" | vm.opt.ExplicitGCInvokesConcurrent == "null" * @run main/timeout=600 LowMemoryTest */