diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 81154df8c20..72294911000 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -271,9 +271,6 @@ java/nio/channels/Selector/OutOfBand.java macosx-all # 7140992 java/rmi/server/Unreferenced/finiteGCLatency/FiniteGCLatency.java generic-all -# 6948101 -java/rmi/transport/pinLastArguments/PinLastArguments.java generic-all - # 7146541 java/rmi/transport/rapidExportUnexport/RapidExportUnexport.java linux-all diff --git a/jdk/test/java/rmi/transport/pinLastArguments/PinLastArguments.java b/jdk/test/java/rmi/transport/pinLastArguments/PinLastArguments.java index 445bdf389ba..f82560236c6 100644 --- a/jdk/test/java/rmi/transport/pinLastArguments/PinLastArguments.java +++ b/jdk/test/java/rmi/transport/pinLastArguments/PinLastArguments.java @@ -78,10 +78,15 @@ public class PinLastArguments { } impl = null; - System.gc(); - - if (ref.get() != null) { - throw new Error("TEST FAILED: impl not garbage collected"); + // Might require multiple calls to System.gc() for weak-references + // processing to be complete. If the weak-reference is not cleared as + // expected we will hang here until timed out by the test harness. + while (true) { + System.gc(); + Thread.sleep(20); + if (ref.get() == null) { + break; + } } System.err.println("TEST PASSED");