[jboss-cvs] JBossAS SVN: r97316 - in branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test: ejbthree994/unit and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Dec 2 14:53:23 EST 2009


Author: rachmatowicz at jboss.com
Date: 2009-12-02 14:53:23 -0500 (Wed, 02 Dec 2009)
New Revision: 97316

Modified:
   branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/clusteredentity/unit/EntityClassloaderTestBase.java
   branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/clusteredentity/unit/EntityQueryRedeployUnitTestCase.java
   branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/ejbthree994/unit/MultiBindingsTestCase.java
   branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/jbpapp584/unit/DynamicSecurityUnitTestCase.java
Log:
Fix URLs in some EJB test cases (JBPAPP-2997)

Modified: branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/clusteredentity/unit/EntityClassloaderTestBase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/clusteredentity/unit/EntityClassloaderTestBase.java	2009-12-02 19:16:01 UTC (rev 97315)
+++ branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/clusteredentity/unit/EntityClassloaderTestBase.java	2009-12-02 19:53:23 UTC (rev 97316)
@@ -73,22 +73,28 @@
    {
       super.setUp();
       
-      sfsb0 = getEntityQueryTest(System.getProperty("jbosstest.cluster.node0"));
-      sfsb1 = getEntityQueryTest(System.getProperty("jbosstest.cluster.node1"));  
+      // JBPAPP-2997
+      String host0 = System.getProperty("jbosstest.cluster.node0") ;
+      String hostForURL0 = System.getProperty("jbosstest.cluster.node0.url") ;
+      String host1 = System.getProperty("jbosstest.cluster.node1") ;
+      String hostForURL1 = System.getProperty("jbosstest.cluster.node1.url") ;
+      
+      sfsb0 = getEntityQueryTest(host0, hostForURL0);
+      sfsb1 = getEntityQueryTest(host1, hostForURL1);  
       sfsb0.cleanup();
       sfsb1.cleanup();
    }
    
-   protected EntityQueryTest getEntityQueryTest(String nodeJNDIAddress) throws Exception
+   protected EntityQueryTest getEntityQueryTest(String nodeAddress, String nodeAddressForURL) throws Exception
    {
       Properties prop1 = new Properties();
       prop1.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
       prop1.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
-      prop1.put("java.naming.provider.url", "jnp://" + nodeJNDIAddress + ":1099");
+      prop1.put("java.naming.provider.url", "jnp://" + nodeAddressForURL + ":1099");
    
-      log.info("===== Naming properties for " + nodeJNDIAddress + ": ");
+      log.info("===== Naming properties for " + nodeAddress + ": ");
       log.info(prop1);
-      log.info("Create InitialContext for " + nodeJNDIAddress);
+      log.info("Create InitialContext for " + nodeAddress);
       InitialContext ctx1 = new InitialContext(prop1);
    
       log.info("Lookup sfsb from " + nodeJNDIAddress);

Modified: branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/clusteredentity/unit/EntityQueryRedeployUnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/clusteredentity/unit/EntityQueryRedeployUnitTestCase.java	2009-12-02 19:16:01 UTC (rev 97315)
+++ branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/clusteredentity/unit/EntityQueryRedeployUnitTestCase.java	2009-12-02 19:53:23 UTC (rev 97316)
@@ -70,7 +70,10 @@
       sleep(2000);
       
       // Get the SFSB again
-      sfsb1 = getEntityQueryTest(System.getProperty("jbosstest.cluster.node1"));
+      // JBPAPP-2997
+      String host = System.getProperty("jbosstest.cluster.node1") ;
+      String hostForURL = System.getProperty("jbosstest.cluster.node1.url") ;
+      sfsb1 = getEntityQueryTest(host, hostForURL);
    }
    
    

Modified: branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/ejbthree994/unit/MultiBindingsTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/ejbthree994/unit/MultiBindingsTestCase.java	2009-12-02 19:16:01 UTC (rev 97315)
+++ branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/ejbthree994/unit/MultiBindingsTestCase.java	2009-12-02 19:53:23 UTC (rev 97316)
@@ -55,9 +55,10 @@
       return locator.getOriginalURI();
    }
 
-   private static String getBindingName()
+   // JBPAPP-2997
+   private static String getBindingNameForURL()
    {
-      String bindingName = System.getProperty("jboss.bind.address");
+      String bindingName = System.getProperty("jboss.bind.url.address");
       if (bindingName == null)
       {
          bindingName = "127.0.0.1";
@@ -73,7 +74,7 @@
          assertEquals(actual, "*** 123 ***");
          
          String proxyUri = getProxyUri(bean);
-         assertEquals(proxyUri, "socket://" + getBindingName() + ":3873/");
+         assertEquals(proxyUri, "socket://" + getBindingNameForURL() + ":3873/");
       }
 
       {
@@ -82,7 +83,7 @@
          assertEquals(actual, "*** 456 ***");
          
          String proxyUri = getProxyUri(bean);
-         assertEquals(proxyUri, "socket://" + getBindingName() + ":3874/");
+         assertEquals(proxyUri, "socket://" + getBindingNameForURL() + ":3874/");
       }
       
       {
@@ -91,7 +92,7 @@
          assertEquals(actual, "*** 789 ***");
          
          String proxyUri = getProxyUri(bean);
-         assertEquals(proxyUri, "socket://" + getBindingName() + ":3875/");
+         assertEquals(proxyUri, "socket://" + getBindingNameForURL() + ":3875/");
       }
    }
    

Modified: branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/jbpapp584/unit/DynamicSecurityUnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/jbpapp584/unit/DynamicSecurityUnitTestCase.java	2009-12-02 19:16:01 UTC (rev 97315)
+++ branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/jbpapp584/unit/DynamicSecurityUnitTestCase.java	2009-12-02 19:53:23 UTC (rev 97316)
@@ -51,8 +51,9 @@
    {
       HttpClient client = new HttpClient();
       client.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials("Test", "jbpapp584"));
-      String host = System.getProperty("jboss.bind.address", "localhost");
-      GetMethod method = new GetMethod("http://" + host + ":8080/jbpapp584/MyServlet?option=A");
+      // JBPAPP-2997
+      String hostForURL = System.getProperty("jboss.bind.url.address", "localhost");
+      GetMethod method = new GetMethod("http://" + hostForURL + ":8080/jbpapp584/MyServlet?option=A");
       int responseCode = client.executeMethod(method);
       String actual = method.getResponseBodyAsString();
       method.releaseConnection();
@@ -70,11 +71,12 @@
    {
       HttpClient client = new HttpClient();
       client.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials("Bill", "jbpapp584"));
-      String host = System.getProperty("jboss.bind.address", "localhost");
+      // JBPAPP-2997
+      String hostForURL = System.getProperty("jboss.bind.url.address", "localhost");
       GetMethod method = new GetMethod();
       // do work on company A
       {
-         method.setURI(new HttpURL("http://" + host + ":8080/jbpapp584/MyServlet?option=CompanyA"));
+         method.setURI(new HttpURL("http://" + hostForURL + ":8080/jbpapp584/MyServlet?option=CompanyA"));
          int responseCode = client.executeMethod(method);
          String actual = method.getResponseBodyAsString();
          
@@ -91,7 +93,7 @@
       // do more work on company A
       {
          // do not specify the option, it must have been retained
-         method.setURI(new HttpURL("http://" + host + ":8080/jbpapp584/MyServlet"));
+         method.setURI(new HttpURL("http://" + hostForURL + ":8080/jbpapp584/MyServlet"));
          int responseCode = client.executeMethod(method);
          String actual = method.getResponseBodyAsString();
          
@@ -110,11 +112,12 @@
    {
       HttpClient client = new HttpClient();
       client.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials("Bill", "jbpapp584"));
-      String host = System.getProperty("jboss.bind.address", "localhost");
+      // JBPAPP-2997
+      String hostForURL = System.getProperty("jboss.bind.url.address", "localhost");
       GetMethod method = new GetMethod();
       // do work on company A
       {
-         method.setURI(new HttpURL("http://" + host + ":8080/jbpapp584/MyServlet?option=CompanyA"));
+         method.setURI(new HttpURL("http://" + hostForURL + ":8080/jbpapp584/MyServlet?option=CompanyA"));
          int responseCode = client.executeMethod(method);
          String actual = method.getResponseBodyAsString();
          
@@ -130,7 +133,7 @@
       assertEquals("JSESSIONID", cookie.getName());
       // do work on company B
       {
-         method.setURI(new HttpURL("http://" + host + ":8080/jbpapp584/MyServlet?option=CompanyB"));
+         method.setURI(new HttpURL("http://" + hostForURL + ":8080/jbpapp584/MyServlet?option=CompanyB"));
          int responseCode = client.executeMethod(method);
          String actual = method.getResponseBodyAsString();
          




More information about the jboss-cvs-commits mailing list