aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java
index 6804faa..55ec17a 100644
--- a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java
+++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java
@@ -138,8 +138,10 @@ public class ServerAccess {
System.exit(0);
} else {
int port = 44321;
- if (args.length > 0) {
- port=new Integer(args[0]);
+ if (args.length > 0 && args[0].equalsIgnoreCase("randomport")) {
+ port = findFreePort();
+ } else if (args.length > 0) {
+ port = new Integer(args[0]);
}
getIndependentInstance(port);
while (true) {