diff options
author | Andrew Azores <[email protected]> | 2013-11-27 16:37:38 -0500 |
---|---|---|
committer | Andrew Azores <[email protected]> | 2013-11-27 16:37:38 -0500 |
commit | de9b5d773fb4adec13673ca26cb61b534e6c5012 (patch) | |
tree | a5db29703e13c5bf905b01d79c64aee4854ed56a /tests | |
parent | 4e54b331710269c584f8c328fbb395789b4a5502 (diff) |
JNLPClassLoaderDeadlock reproducer made more reliable
Diffstat (limited to 'tests')
3 files changed, 5 insertions, 4 deletions
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", |