aboutsummaryrefslogtreecommitdiffstats
path: root/tests/netx
diff options
context:
space:
mode:
authorJiri Vanek <[email protected]>2012-04-03 17:08:14 +0200
committerJiri Vanek <[email protected]>2012-04-03 17:08:14 +0200
commite73ab7ec0e381bfab6fce1e1b614d88791f2f326 (patch)
tree56fe5578af770c832a5d6eeac8af11350e1df341 /tests/netx
parent9a53b5167e56106f4d225059262c124e929b7352 (diff)
Test virtual server thread marked as daeomn by default
Diffstat (limited to 'tests/netx')
-rw-r--r--tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java19
1 files changed, 16 insertions, 3 deletions
diff --git a/tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java b/tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java
index a7527b9..adfdef9 100644
--- a/tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java
+++ b/tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java
@@ -186,9 +186,12 @@ public class ServerAccess {
* usefull for testing application loading from different url then base
*/
public static ServerLauncher getIndependentInstance() {
+ return getIndependentInstance(true);
+ }
+ public static ServerLauncher getIndependentInstance(boolean daemon) {
String dir = (System.getProperty(TEST_SERVER_DIR));
try{
- return getIndependentInstance(dir, findFreePort());
+ return getIndependentInstance(dir, findFreePort(),daemon);
}catch (Exception ex){
throw new RuntimeException(ex);
}
@@ -200,9 +203,13 @@ public class ServerAccess {
* @return new not cached iserver instance on random port,
* usefull for testing application loading from different url then base
*/
+
public static ServerLauncher getIndependentInstance(int port) {
+ return getIndependentInstance(port, true);
+ }
+ public static ServerLauncher getIndependentInstance(int port,boolean daemon) {
String dir = (System.getProperty(TEST_SERVER_DIR));
- return getIndependentInstance(dir,port);
+ return getIndependentInstance(dir,port,daemon);
}
/**
@@ -210,7 +217,11 @@ public class ServerAccess {
* @return new not cached iserver instance on random port upon custom www root directory,
* usefull for testing application loading from different url then base
*/
+
public static ServerLauncher getIndependentInstance(String dir, int port) {
+ return getIndependentInstance(dir, port, true);
+ }
+ public static ServerLauncher getIndependentInstance(String dir, int port,boolean daemon) {
if (dir == null || dir.trim().length() == 0 || !new File(dir).exists() || !new File(dir).isDirectory()) {
@@ -218,7 +229,9 @@ public class ServerAccess {
}
try {
ServerLauncher lServerLuncher = new ServerLauncher(port, new File(dir));
- new Thread(lServerLuncher).start();
+ Thread r=new Thread(lServerLuncher);
+ r.setDaemon(daemon);
+ r.start();
return lServerLuncher;
} catch (Exception ex) {
throw new RuntimeException(ex);