Author: ropalka
Date: 2012-02-28 09:21:09 -0500 (Tue, 28 Feb 2012)
New Revision: 15772
Modified:
shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java
shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
Log:
[JBWS-3435] support for multiple appclient args + make getXYZInitialContext() methods
public
Modified: shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java
===================================================================
--- shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2012-02-28
14:20:18 UTC (rev 15771)
+++ shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2012-02-28
14:21:09 UTC (rev 15772)
@@ -296,7 +296,7 @@
* Every test calling this method have to ensure InitialContext.close()
* method is called at end of test to clean up all associated caches.
*/
- protected static InitialContext getAppclientInitialContext() throws NamingException,
IOException
+ public static InitialContext getAppclientInitialContext() throws NamingException,
IOException
{
final Hashtable<String, String> env =
getEnvironment("appclient.jndi.properties");
return new InitialContext(env);
@@ -306,7 +306,7 @@
* Every test calling this method have to ensure InitialContext.close()
* method is called at end of test to clean up all associated caches.
*/
- protected static InitialContext getServerInitialContext() throws NamingException,
IOException
+ public static InitialContext getServerInitialContext() throws NamingException,
IOException
{
final Hashtable<String, String> env =
getEnvironment("server.jndi.properties");
return new InitialContext(env);
Modified: shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
---
shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2012-02-28
14:20:18 UTC (rev 15771)
+++
shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2012-02-28
14:21:09 UTC (rev 15772)
@@ -30,6 +30,8 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.net.UnknownHostException;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import javax.management.MBeanServerConnection;
@@ -115,7 +117,7 @@
/** Deploy the given archive to the appclient.
* Archive name is always in form archive.ear#appclient.jar
*/
- public static Process deployAppclient(final String archive, final OutputStream
appclientOS, final String appclientArg) throws Exception
+ public static Process deployAppclient(final String archive, final OutputStream
appclientOS, final String... appclientArgs) throws Exception
{
if (DEPLOY_PROCESS_ENABLED)
{
@@ -132,7 +134,15 @@
}
else
{
- appclientProcess = new ProcessBuilder().command(appclientScript,
appclientFullName, appclientArg).start();
+ final List<String> args = new LinkedList<String>();
+ args.add(appclientScript);
+ args.add(appclientFullName);
+ // propagate appclient args
+ for (final String appclientArg : appclientArgs)
+ {
+ args.add(appclientArg);
+ }
+ appclientProcess = new ProcessBuilder().command(args).start();
}
final CopyJob inputStreamJob = new CopyJob(appclientProcess.getInputStream(),
appclientOS == null ? new TeeOutputStream(baos, System.out) : new
TeeOutputStream(baos, System.out, appclientOS));
Show replies by date