aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Vanek <[email protected]>2012-08-17 13:44:33 +0200
committerJiri Vanek <[email protected]>2012-08-17 13:44:33 +0200
commitd2067f4507e5f3fb044d2413be50e00c6826cbde (patch)
tree7fcc1757d09268b3ebc0798187eccb9dc26185ca
parent71bd5ab0a09c7f91645e09eb9c6dbd89c755647b (diff)
Fixed DeadlockTest and listeners forwarding
-rw-r--r--ChangeLog9
-rw-r--r--tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java8
-rw-r--r--tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java2
3 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index dae9a60..c7ca0bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-08-17 Jiri Vanek <[email protected]>
+
+ * 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 <[email protected]>
Classpaths in jars' manifests are only considered when the applet is run
diff --git a/tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java b/tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java
index b2e0a48..e753819 100644
--- a/tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java
+++ b/tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java
@@ -84,12 +84,12 @@ public class DeadLockTestTest {
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()));
diff --git a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java
index bd5ec01..7924528 100644
--- a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java
+++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java
@@ -548,7 +548,7 @@ public class ServerAccess {
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);
}
/**