changeset 477:899ea10955a7

Fixed DeadlockTest and listeners forwarding
author Jiri Vanek <jvanek@redhat.com>
date Fri, 17 Aug 2012 13:44:22 +0200
parents 684acbb6c35e
children 304d14046a2a
files ChangeLog tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java
diffstat 3 files changed, 14 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Aug 15 14:44:14 2012 -0400
+++ b/ChangeLog	Fri Aug 17 13:44:22 2012 +0200
@@ -1,3 +1,12 @@
+2012-08-17  Jiri Vanek  <jvanek@redhat.com>
+
+	* tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java:
+	(testDeadLockTestTerminatedBody) removed tests for killed-process and
+	termination of remaining javas put on correct place.
+	* tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java:
+	(executeBrowser)  stout and stderr listeners forwarded to next method in
+	correct order.
+
 2012-08-14  Danesh Dadachanji  <ddadacha@redhat.com>
 
 	Small addition to NEWS entry and bug annotation indicating the PR975 fix.
--- a/tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java	Wed Aug 15 14:44:14 2012 -0400
+++ b/tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java	Fri Aug 17 13:44:22 2012 +0200
@@ -84,12 +84,12 @@
         assertDeadlockTestLaunched(pr);
         List<String> after = countJavaInstances();
         ServerAccess.logOutputReprint("java2 " + jnlp + " : " + after.size());
+        killDiff(before, after);
         String ss = "This process is hanging more than 30s. Should be killed";
         Assert.assertFalse("stdout should not contains: " + ss + ", but did", pr.stdout.contains(ss));
-//        Assert.assertTrue(pr.stderr.contains("xception"));, exception is thrown by engine,not by application
-        Assert.assertTrue("testDeadLockTestTerminated should be terminated, but wasn't", pr.wasTerminated);
-        Assert.assertNull("Killed process must have null return value. Have not - ", pr.returnValue);
-        killDiff(before, after);
+//        as we are tryng to terminate process as harmless as possible those two are no longer valid in all cases
+//        Assert.assertTrue("testDeadLockTestTerminated should be terminated, but wasn't", pr.wasTerminated);
+//        Assert.assertNull("Killed process must have null return value. Have not - ", pr.returnValue);
         List<String> afterKill = countJavaInstances();
         ServerAccess.logOutputReprint("java3 " + jnlp + " : " + afterKill.size());
         Assert.assertEquals("assert that just old javas remians", 0, (before.size() - afterKill.size()));
--- a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java	Wed Aug 15 14:44:14 2012 -0400
+++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java	Fri Aug 17 13:44:22 2012 +0200
@@ -546,7 +546,7 @@
         return executeBrowser(getBrowserParams(), resource);
     }
     public ProcessResult executeBrowser(String resource,ContentReaderListener stdoutl,ContentReaderListener stderrl) throws Exception {
-        return executeBrowser(getBrowserParams(), resource,stderrl,stdoutl);
+        return executeBrowser(getBrowserParams(), resource, stdoutl, stderrl);
     }
 
     /**