[jboss-cvs] JBossAS SVN: r109593 - in branches/JBoss-AS-6.0.x-ipv6/testsuite: src/main/org/jboss/test/naming/test and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Nov 30 18:00:55 EST 2010
Author: rachmatowicz at jboss.com
Date: 2010-11-30 18:00:53 -0500 (Tue, 30 Nov 2010)
New Revision: 109593
Modified:
branches/JBoss-AS-6.0.x-ipv6/testsuite/build.xml
branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/naming/test/NamingRestartUnitTestCase.java
branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/naming/test/SecurityUnitTestCase.java
branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/naming/test/SimpleUnitTestCase.java
branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/security/test/CustomPrincipalPropagationUnitTestCase.java
branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/web/security/CustomHeaderAuthTestCase.java
branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/web/test/SingleSignOnUnitTestCase.java
Log:
Fix URL generation in a number of naming, security and web test cases (JBAS-8540)
Modified: branches/JBoss-AS-6.0.x-ipv6/testsuite/build.xml
===================================================================
--- branches/JBoss-AS-6.0.x-ipv6/testsuite/build.xml 2010-11-30 22:59:20 UTC (rev 109592)
+++ branches/JBoss-AS-6.0.x-ipv6/testsuite/build.xml 2010-11-30 23:00:53 UTC (rev 109593)
@@ -2842,8 +2842,8 @@
<sysproperty key="build.testlog" value="${build.testlog}"/>
<sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
<sysproperty key="javax.xml.registry.ConnectionFactoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
- <sysproperty key="jaxr.query.url" value="http://${node0}:8080/juddi/inquiry"/>
- <sysproperty key="jaxr.publish.url" value="http://${node0}:8080/juddi/publish"/>
+ <sysproperty key="jaxr.query.url" value="http://${node0.url}:8080/juddi/inquiry"/>
+ <sysproperty key="jaxr.publish.url" value="http://${node0.url}:8080/juddi/publish"/>
<sysproperty key="scout.proxy.transportClass" value="org.jboss.jaxr.scout.transport.SaajTransport"/>
<sysproperty key="host.name" value="${node0}"/>
<sysproperty key="jndi.bind.name" value="JAXR"/>
Modified: branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/naming/test/NamingRestartUnitTestCase.java
===================================================================
--- branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/naming/test/NamingRestartUnitTestCase.java 2010-11-30 22:59:20 UTC (rev 109592)
+++ branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/naming/test/NamingRestartUnitTestCase.java 2010-11-30 23:00:53 UTC (rev 109593)
@@ -426,7 +426,8 @@
private Properties createNamingEnvironment(String port)
{
- String namingURL = getServerHost() + ":" + port;
+ // JBAS-8540
+ String namingURL = getServerHostForURL() + ":" + port;
Properties env = new Properties();
env.setProperty(Context.PROVIDER_URL, namingURL);
env.setProperty(NamingContext.JNP_DISABLE_DISCOVERY, "true");
Modified: branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/naming/test/SecurityUnitTestCase.java
===================================================================
--- branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/naming/test/SecurityUnitTestCase.java 2010-11-30 22:59:20 UTC (rev 109592)
+++ branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/naming/test/SecurityUnitTestCase.java 2010-11-30 23:00:53 UTC (rev 109593)
@@ -72,8 +72,9 @@
protected void setUp() throws Exception
{
super.setUp();
- JNDI_URL = "jnp://" + getServerHost() + ":1099/";
- INVOKER_BASE = "http://"+ getServerHost() + ":8080/invoker/";
+ // JBAS-8540
+ JNDI_URL = "jnp://" + getServerHostForURL() + ":1099/";
+ INVOKER_BASE = "http://"+ getServerHostForURL() + ":8080/invoker/";
}
/**
Modified: branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/naming/test/SimpleUnitTestCase.java
===================================================================
--- branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/naming/test/SimpleUnitTestCase.java 2010-11-30 22:59:20 UTC (rev 109592)
+++ branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/naming/test/SimpleUnitTestCase.java 2010-11-30 23:00:53 UTC (rev 109593)
@@ -113,7 +113,8 @@
{
getLog().debug("+++ testNameChanges");
InitialContext ctx = getInitialContext();
- Name name = ctx.getNameParser("").parse("jnp://" + getServerHost() + "/jmx");
+ // JBAS-8540
+ Name name = ctx.getNameParser("").parse("jnp://" + getServerHostForURL() + "/jmx");
Name copy = (Name) name.clone();
Object obj = ctx.lookup(name);
getLog().debug("lookup("+name+") = "+obj);
@@ -142,7 +143,7 @@
// Do a lookup on a server port that does not exist
env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
- env.setProperty(Context.PROVIDER_URL, "jnp://" + getServerHost() + ":65535/");
+ env.setProperty(Context.PROVIDER_URL, "jnp://" + getServerHostForURL() + ":65535/");
env.setProperty("jnp.disableDiscovery", "true");
getLog().debug("Creating InitialContext with env="+env);
try
@@ -161,7 +162,7 @@
{
getLog().debug("+++ testHaInvoker");
Properties env = new Properties();
- env.setProperty(Context.PROVIDER_URL, "jnp://" + getServerHost() + ":1100/");
+ env.setProperty(Context.PROVIDER_URL, "jnp://" + getServerHostForURL() + ":1100/");
getLog().debug("Creating InitialContext with env="+env);
InitialContext ctx = new InitialContext(env);
getLog().debug("Created InitialContext");
@@ -188,7 +189,7 @@
// Lookup a name that does not exist
java.util.Properties env = new java.util.Properties();
env.setProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
- env.setProperty(javax.naming.Context.PROVIDER_URL, "jnp://" + getServerHost() + ":1100/");
+ env.setProperty(javax.naming.Context.PROVIDER_URL, "jnp://" + getServerHostForURL() + ":1100/");
getLog().debug("Creating InitialContext with env="+env);
InitialContext ctx = new javax.naming.InitialContext(env);
@@ -234,9 +235,9 @@
{
getLog().debug("+++ testHaPartitionName");
Properties env = new Properties();
- String serverHost = getServerHost();
- env.setProperty(Context.PROVIDER_URL, "jnp://" + serverHost + ":65535/");
- env.setProperty("jnp.localAddress", serverHost);
+ // JBAS-8540
+ env.setProperty(Context.PROVIDER_URL, "jnp://" + getServerHostForURL() + ":65535/");
+ env.setProperty("jnp.localAddress", getServerHost());
env.setProperty("jnp.partitionName", "DefaultPartition");
// Don't let the discovery packet off the test server so we don't
// get spurious responses from other servers on the network
@@ -262,7 +263,7 @@
ctx.close();
// Now test discovery with a non-existent partition name
- env.setProperty(Context.PROVIDER_URL, "jnp://" + getServerHost() + ":65535/");
+ env.setProperty(Context.PROVIDER_URL, "jnp://" + getServerHostForURL() + ":65535/");
env.setProperty("jnp.partitionName", "__NotTheDefaultPartition__");
try
{
@@ -285,9 +286,9 @@
{
getLog().debug("+++ testDiscoveryPort");
Properties env = new Properties();
- String serverHost = getServerHost();
- env.setProperty(Context.PROVIDER_URL, "jnp://" + serverHost + ":65535/");
- env.setProperty("jnp.localAddress", serverHost);
+ // JBAS-8540
+ env.setProperty(Context.PROVIDER_URL, "jnp://" + getServerHostForURL() + ":65535/");
+ env.setProperty("jnp.localAddress", getServerHost());
env.setProperty("jnp.discoveryPort", "1102");
// Don't let the discovery packet off the test server so we don't
// get spurious responses from other servers on the network
@@ -318,7 +319,7 @@
getLog().debug("+++ testHttpInvoker");
Properties env = new Properties();
env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.HttpNamingContextFactory");
- env.setProperty(Context.PROVIDER_URL, "http://" + getServerHost() + ":8080/invoker/JNDIFactory");
+ env.setProperty(Context.PROVIDER_URL, "http://" + getServerHostForURL() + ":8080/invoker/JNDIFactory");
getLog().debug("Creating InitialContext with env="+env);
InitialContext ctx = new InitialContext(env);
getLog().debug("Created InitialContext");
Modified: branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/security/test/CustomPrincipalPropagationUnitTestCase.java
===================================================================
--- branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/security/test/CustomPrincipalPropagationUnitTestCase.java 2010-11-30 22:59:20 UTC (rev 109592)
+++ branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/security/test/CustomPrincipalPropagationUnitTestCase.java 2010-11-30 23:00:53 UTC (rev 109593)
@@ -97,7 +97,8 @@
*/
public void testCustomPrincipalTransmissionInVM() throws Exception
{
- String baseURLNoAuth = "http://" + getServerHost() + ":" + Integer.getInteger("web.port", 8080) + "/";
+ // JBAS-8540
+ String baseURLNoAuth = "http://" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080) + "/";
HttpClient httpConn = new HttpClient();
GetMethod indexGet = new GetMethod(baseURLNoAuth + "custom-principal/");
int responseCode = httpConn.executeMethod(indexGet);
Modified: branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/web/security/CustomHeaderAuthTestCase.java
===================================================================
--- branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/web/security/CustomHeaderAuthTestCase.java 2010-11-30 22:59:20 UTC (rev 109592)
+++ branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/web/security/CustomHeaderAuthTestCase.java 2010-11-30 23:00:53 UTC (rev 109593)
@@ -58,7 +58,8 @@
protected void setUp() throws Exception
{
super.setUp();
- baseURLNoAuth = "http://" + getServerHost() + ":" + Integer.getInteger("web.port", 8080) + "/";
+ // JBAS-8540
+ baseURLNoAuth = "http://" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080) + "/";
}
/**
Modified: branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/web/test/SingleSignOnUnitTestCase.java
===================================================================
--- branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/web/test/SingleSignOnUnitTestCase.java 2010-11-30 22:59:20 UTC (rev 109592)
+++ branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/web/test/SingleSignOnUnitTestCase.java 2010-11-30 23:00:53 UTC (rev 109593)
@@ -43,7 +43,8 @@
protected void setUp() throws Exception
{
super.setUp();
- baseURLNoAuth = "http://" + getServerHost() + ":" + Integer.getInteger("web.port", 8080);
+ // JBAS-8540
+ baseURLNoAuth = "http://" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080);
}
/** Test single sign-on across two web apps using form based auth
More information about the jboss-cvs-commits
mailing list