From de9b5d773fb4adec13673ca26cb61b534e6c5012 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Wed, 27 Nov 2013 16:37:38 -0500 Subject: JNLPClassLoaderDeadlock reproducer made more reliable --- ChangeLog | 10 ++++++++++ .../srcs/JNLPClassLoaderDeadlock_1.java | 1 - .../srcs/JNLPClassLoaderDeadlock_2.java | 1 - .../testcases/JNLPClassLoaderDeadlockTest.java | 7 +++++-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3f7b1bb..d29b310 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2013-11-27 Andrew Azores + + Made JNLPClassLoaderDeadlock reproducer more reliable + * tests/reproducers/custom/JNLPClassLoaderDeadlock/srcs/JNLPClassLoaderDeadlock_1.java: + Removed "AutoOkClosingListener" magic string + * tests/reproducers/custom/JNLPClassLoaderDeadlock/srcs/JNLPClassLoaderDeadlock_2.java: + same + * tests/reproducers/custom/JNLPClassLoaderDeadlock/testcases/JNLPClassLoaderDeadlockTest.java: + Changed AutoOkClosingListener to RulesFolowingClosingListener + 2013-11-26 Jiri Vanek Reverted "fix to ManifestedJar1Test cases", better manifestedjar tests, diff --git a/tests/reproducers/custom/JNLPClassLoaderDeadlock/srcs/JNLPClassLoaderDeadlock_1.java b/tests/reproducers/custom/JNLPClassLoaderDeadlock/srcs/JNLPClassLoaderDeadlock_1.java index 616e5d3..40e7ab9 100644 --- a/tests/reproducers/custom/JNLPClassLoaderDeadlock/srcs/JNLPClassLoaderDeadlock_1.java +++ b/tests/reproducers/custom/JNLPClassLoaderDeadlock/srcs/JNLPClassLoaderDeadlock_1.java @@ -15,7 +15,6 @@ public class JNLPClassLoaderDeadlock_1 extends Applet { setBackground(Color.white); add(tf); System.out.println("JNLPClassLoaderDeadlock_1 applet finished"); - System.out.println("*** APPLET FINISHED ***"); } public static void main(String[] args) { diff --git a/tests/reproducers/custom/JNLPClassLoaderDeadlock/srcs/JNLPClassLoaderDeadlock_2.java b/tests/reproducers/custom/JNLPClassLoaderDeadlock/srcs/JNLPClassLoaderDeadlock_2.java index 6def405..a3c0788 100644 --- a/tests/reproducers/custom/JNLPClassLoaderDeadlock/srcs/JNLPClassLoaderDeadlock_2.java +++ b/tests/reproducers/custom/JNLPClassLoaderDeadlock/srcs/JNLPClassLoaderDeadlock_2.java @@ -78,6 +78,5 @@ public class JNLPClassLoaderDeadlock_2 extends Applet implements Runnable { } } System.out.println("JNLPClassLoaderDeadlock_2 applet finished"); - System.out.println("*** APPLET FINISHED ***"); } } diff --git a/tests/reproducers/custom/JNLPClassLoaderDeadlock/testcases/JNLPClassLoaderDeadlockTest.java b/tests/reproducers/custom/JNLPClassLoaderDeadlock/testcases/JNLPClassLoaderDeadlockTest.java index 84b93d8..bc87e9d 100644 --- a/tests/reproducers/custom/JNLPClassLoaderDeadlock/testcases/JNLPClassLoaderDeadlockTest.java +++ b/tests/reproducers/custom/JNLPClassLoaderDeadlock/testcases/JNLPClassLoaderDeadlockTest.java @@ -43,7 +43,7 @@ import net.sourceforge.jnlp.annotations.NeedsDisplay; import net.sourceforge.jnlp.annotations.TestInBrowsers; import net.sourceforge.jnlp.browsertesting.BrowserTest; import net.sourceforge.jnlp.browsertesting.Browsers; -import net.sourceforge.jnlp.closinglisteners.AutoOkClosingListener; +import net.sourceforge.jnlp.closinglisteners.RulesFolowingClosingListener; import static org.junit.Assert.assertTrue; import org.junit.Test; @@ -55,7 +55,10 @@ public class JNLPClassLoaderDeadlockTest extends BrowserTest { @TestInBrowsers(testIn={Browsers.one}) @Bug(id="RH976833") public void testClassLoaderDeadlock() throws Exception { - ProcessResult pr = server.executeBrowser("JNLPClassLoaderDeadlock.html", AutoClose.CLOSE_ON_CORRECT_END); + RulesFolowingClosingListener listener = new RulesFolowingClosingListener(); + listener.addContainsRule("JNLPClassLoaderDeadlock_1 applet finished"); + listener.addContainsRule("JNLPClassLoaderDeadlock_2 applet finished"); + ProcessResult pr = server.executeBrowser("JNLPClassLoaderDeadlock.html", listener, null); assertTrue("First applet should have initialized", pr.stdout.contains("JNLPClassLoaderDeadlock_1 applet initialized")); assertTrue("Second applet should have initialized", -- cgit v1.2.3