提交 36739fa7 编写于 作者: S smarks

6948101: java/rmi/transport/pinLastArguments/PinLastArguments.java failing intermittently

Reviewed-by: dholmes, smarks
Contributed-by: NEric Wang <yiming.wang@oracle.com>
上级 dac269da
...@@ -271,9 +271,6 @@ java/nio/channels/Selector/OutOfBand.java macosx-all ...@@ -271,9 +271,6 @@ java/nio/channels/Selector/OutOfBand.java macosx-all
# 7140992 # 7140992
java/rmi/server/Unreferenced/finiteGCLatency/FiniteGCLatency.java generic-all java/rmi/server/Unreferenced/finiteGCLatency/FiniteGCLatency.java generic-all
# 6948101
java/rmi/transport/pinLastArguments/PinLastArguments.java generic-all
# 7146541 # 7146541
java/rmi/transport/rapidExportUnexport/RapidExportUnexport.java linux-all java/rmi/transport/rapidExportUnexport/RapidExportUnexport.java linux-all
......
...@@ -78,10 +78,15 @@ public class PinLastArguments { ...@@ -78,10 +78,15 @@ public class PinLastArguments {
} }
impl = null; impl = null;
System.gc(); // Might require multiple calls to System.gc() for weak-references
// processing to be complete. If the weak-reference is not cleared as
if (ref.get() != null) { // expected we will hang here until timed out by the test harness.
throw new Error("TEST FAILED: impl not garbage collected"); while (true) {
System.gc();
Thread.sleep(20);
if (ref.get() == null) {
break;
}
} }
System.err.println("TEST PASSED"); System.err.println("TEST PASSED");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册