Author: pete.muir(a)jboss.org
Date: 2009-03-13 09:54:08 -0400 (Fri, 13 Mar 2009)
New Revision: 1971
Modified:
ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/AbstractContainersImpl.java
test-harness/trunk/impl/src/main/java/org/jboss/testharness/AbstractTest.java
Log:
unfinished work on binding to another host than localhost
Modified:
ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/AbstractContainersImpl.java
===================================================================
---
ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/AbstractContainersImpl.java 2009-03-13
13:53:27 UTC (rev 1970)
+++
ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/AbstractContainersImpl.java 2009-03-13
13:54:08 UTC (rev 1971)
@@ -35,6 +35,7 @@
public static final String FORCE_RESTART_PROPERTY_NAME =
"jboss.force.restart";
public static final String MAX_DEPLOYMENTS_PROPERTY_NAME =
"jboss.deployments.restart";
public static final String SHUTDOWN_DELAY_PROPERTY_NAME =
"jboss.shutdown.delay";
+ public static final String JBOSS_BIND_ADDRESS_PROPERTY_NAME =
"jboss.bind.address";
private static Logger log = Logger.getLogger(AbstractContainersImpl.class);
@@ -53,6 +54,8 @@
private int jbossShutdownDelay;
+ private String jbossBindAddress;
+
public AbstractContainersImpl()
{
this.properties = new DeploymentProperties();
@@ -79,7 +82,6 @@
public void setConfiguration(Configuration configuration)
{
this.configuration = configuration;
- this.jbossHttpUrl = "http://" + configuration.getHost() + "/";
}
protected boolean isJBossUp()
@@ -128,11 +130,14 @@
}
}
jbossHome = properties.getStringValue(JBOSS_HOME_PROPERTY_NAME, null, true);
+ jbossBindAddress = properties.getStringValue(JBOSS_BIND_ADDRESS_PROPERTY_NAME,
"localhost", false);
+ configuration.setHost(jbossBindAddress + ":8080");
+ this.jbossHttpUrl = "http://" + configuration.getHost() + "/";
javaOpts = properties.getStringValue(JAVA_OPTS_PROPERTY_NAME, "",
false);
javaOpts = javaOpts + JAVA_OPTS;
File jbossHomeFile = new File(jbossHome);
jbossHome = jbossHomeFile.getPath();
- log.info("Using JBoss instance in " + jbossHome + " at URL " +
configuration.getHost());
+ log.info("Using JBoss instance in " + jbossHome + " at URL " +
jbossHttpUrl);
this.bootTimeout = properties.getLongValue(JBOSS_BOOT_TIMEOUT_PROPERTY_NAME,
240000, false);
this.forceRestart = properties.getBooleanValue(FORCE_RESTART_PROPERTY_NAME, false,
false);
this.maxDeployments = properties.getIntValue(MAX_DEPLOYMENTS_PROPERTY_NAME, 25,
false);
@@ -161,7 +166,7 @@
if (!isJBossUp())
{
jbossWasStarted = true;
- launch("run", "");
+ launch("run", "--host=" + jbossBindAddress);
log.info("Starting JBoss instance");
// Wait for JBoss to come up
long timeoutTime = System.currentTimeMillis() + bootTimeout;
Modified: test-harness/trunk/impl/src/main/java/org/jboss/testharness/AbstractTest.java
===================================================================
---
test-harness/trunk/impl/src/main/java/org/jboss/testharness/AbstractTest.java 2009-03-13
13:53:27 UTC (rev 1970)
+++
test-harness/trunk/impl/src/main/java/org/jboss/testharness/AbstractTest.java 2009-03-13
13:54:08 UTC (rev 1971)
@@ -10,6 +10,7 @@
import org.jboss.testharness.api.DeploymentException;
import org.jboss.testharness.api.TestResult;
import org.jboss.testharness.api.TestResult.Status;
+import org.jboss.testharness.impl.ConfigurationImpl;
import org.jboss.testharness.impl.packaging.ArtifactGenerator;
import org.jboss.testharness.impl.packaging.jsr299.JSR299ArtifactDescriptor;
import org.jboss.testharness.impl.packaging.jsr299.TCKArtifactDescriptor;
@@ -263,7 +264,10 @@
}
}
- protected abstract Configuration getCurrentConfiguration();
+ protected Configuration getCurrentConfiguration()
+ {
+ return ConfigurationImpl.get();
+ }
protected String getContextPath()
{
Show replies by date