Author: asoldano
Date: 2013-08-23 09:04:19 -0400 (Fri, 23 Aug 2013)
New Revision: 17888
Modified:
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/AppclientHelper.java
Log:
[JBWS-3696] Make AppclientHelper timeout configurable
Modified:
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/AppclientHelper.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2013-08-23
12:32:23 UTC (rev 17887)
+++
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2013-08-23
13:04:19 UTC (rev 17888)
@@ -51,6 +51,7 @@
private static final String JBOSS_HOME = System.getProperty("jboss.home");
private static final String FS = System.getProperty("file.separator"); //
'/' on unix, '\' on windows
private static final String PS = System.getProperty("path.separator"); //
':' on unix, ';' on windows
+ private static final int TIMEOUT = Integer.getInteger("appclient.timeout",
120);
private static final String EXT = ":".equals(PS) ? ".sh" :
".bat";
private static final String appclientScript = JBOSS_HOME + FS + "bin" + FS +
"appclient" + EXT;
private static final Semaphore s = new Semaphore(1, true); //one appclient only can be
running at the same time ATM
@@ -211,7 +212,7 @@
private static boolean awaitOutput(final OutputStream os, final String patternToMatch)
throws InterruptedException {
int countOfAttempts = 0;
- final int maxCountOfAttempts = 240; // max wait time: 2 minutes
+ final int maxCountOfAttempts = TIMEOUT * 2; // max wait time: default 2 minutes
while (!os.toString().contains(patternToMatch))
{
Thread.sleep(500);
Show replies by date