Author: alessio.soldano(a)jboss.com
Date: 2013-05-30 11:45:53 -0400 (Thu, 30 May 2013)
New Revision: 17633
Modified:
shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/src/main/java/org/jboss/wsf/test/JBossWSTest.java
Log:
[BZ927884] Synch with upstream
Modified:
shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/src/main/java/org/jboss/wsf/test/JBossWSTest.java
===================================================================
---
shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2013-05-30
11:13:35 UTC (rev 17632)
+++
shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2013-05-30
15:45:53 UTC (rev 17633)
@@ -61,6 +61,8 @@
public abstract class JBossWSTest extends TestCase
{
protected static Logger log = Logger.getLogger(JBossWSTest.class.getName());
+ public static final String SYSPROP_COPY_JOB_TIMEOUT =
"test.copy.job.timeout";
+ private static final int COPY_JOB_TIMEOUT =
Integer.getInteger(SYSPROP_COPY_JOB_TIMEOUT, File.pathSeparatorChar == ':' ? 5000
: 60000); //60s on Windows, 5s on UNIX and Mac
public JBossWSTest()
{
@@ -171,16 +173,14 @@
CopyJob inputStreamJob = new CopyJob(p.getInputStream(), os == null ? System.out :
os);
CopyJob errorStreamJob = new CopyJob(p.getErrorStream(), System.err);
// unfortunately the following threads are needed because of Windows behavior
- System.out.println("Process input stream:");
- System.err.println("Process error stream:");
Thread inputJob = new Thread(inputStreamJob);
Thread outputJob = new Thread(errorStreamJob);
try
{
inputJob.start();
- inputJob.join(60000);
+ inputJob.join(COPY_JOB_TIMEOUT);
outputJob.start();
- outputJob.join(60000);
+ outputJob.join(COPY_JOB_TIMEOUT);
int statusCode = p.waitFor();
String fallbackMessage = "Process did exit with status " + statusCode;
assertTrue(message != null ? message : fallbackMessage, statusCode == 0);
Show replies by date