[jboss-cvs] JBossAS SVN: r79622 - in projects/ejb3/trunk/testsuite: src/test/java/org/jboss/ejb3/test/ejbthree994/unit and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 17 02:49:41 EDT 2008
Author: ALRubinger
Date: 2008-10-17 02:49:41 -0400 (Fri, 17 Oct 2008)
New Revision: 79622
Added:
projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree994/ejbthree994-connectors-jboss-beans.xml
Removed:
projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree994/ejbthree994-connectors-service.xml
Modified:
projects/ejb3/trunk/testsuite/build-test.xml
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree994/unit/MultiBindingsTestCase.java
Log:
[EJBTHREE-944][EJBTHREE-1241] Fix regression issues in the tests, move test connectors to jboss-beans.xml from -service.xml
Modified: projects/ejb3/trunk/testsuite/build-test.xml
===================================================================
--- projects/ejb3/trunk/testsuite/build-test.xml 2008-10-17 06:47:48 UTC (rev 79621)
+++ projects/ejb3/trunk/testsuite/build-test.xml 2008-10-17 06:49:41 UTC (rev 79622)
@@ -2287,7 +2287,7 @@
<copy todir="${build.lib}">
<fileset dir="${resources}/test/ejbthree994">
- <include name="ejbthree994-connectors-service.xml"/>
+ <include name="ejbthree994-connectors-jboss-beans.xml"/>
</fileset>
</copy>
</target>
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree994/unit/MultiBindingsTestCase.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree994/unit/MultiBindingsTestCase.java 2008-10-17 06:47:48 UTC (rev 79621)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree994/unit/MultiBindingsTestCase.java 2008-10-17 06:49:41 UTC (rev 79622)
@@ -28,7 +28,6 @@
import junit.framework.Test;
import org.jboss.ejb3.test.ejbthree994.BusinessInterface;
-import org.jboss.remoting.InvokerLocator;
import org.jboss.test.JBossTestCase;
@@ -49,21 +48,11 @@
private static String getProxyUri(Object proxy) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException
{
InvocationHandler handler = Proxy.getInvocationHandler(proxy);
- Field f = handler.getClass().getDeclaredField("uri");
+ Field f = handler.getClass().getDeclaredField("url");
f.setAccessible(true);
- InvokerLocator locator = (InvokerLocator) f.get(handler);
- return locator.getOriginalURI();
+ String url = (String)f.get(handler);
+ return url;
}
-
- private static String getBindingName()
- {
- String bindingName = System.getProperty("jboss.bind.address");
- if (bindingName == null)
- {
- bindingName = "127.0.0.1";
- }
- return bindingName;
- }
public void test1() throws Exception
{
@@ -73,7 +62,7 @@
assertEquals(actual, "*** 123 ***");
String proxyUri = getProxyUri(bean);
- assertEquals(proxyUri, "socket://" + getBindingName() + ":3873/");
+ assertTrue(proxyUri.contains(":3873"));
}
{
@@ -82,7 +71,7 @@
assertEquals(actual, "*** 456 ***");
String proxyUri = getProxyUri(bean);
- assertEquals(proxyUri, "socket://" + getBindingName() + ":3874/");
+ assertTrue(proxyUri.contains(":3874"));
}
{
@@ -91,14 +80,14 @@
assertEquals(actual, "*** 789 ***");
String proxyUri = getProxyUri(bean);
- assertEquals(proxyUri, "socket://" + getBindingName() + ":3875/");
+ assertTrue(proxyUri.contains(":3875"));
}
}
public static Test suite() throws Exception
{
- return getDeploySetup(MultiBindingsTestCase.class, "ejbthree994-connectors-service.xml,ejbthree994.jar");
+ return getDeploySetup(MultiBindingsTestCase.class, "ejbthree994-connectors-jboss-beans.xml,ejbthree994.jar");
}
}
Added: projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree994/ejbthree994-connectors-jboss-beans.xml
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree994/ejbthree994-connectors-jboss-beans.xml (rev 0)
+++ projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree994/ejbthree994-connectors-jboss-beans.xml 2008-10-17 06:49:41 UTC (rev 79622)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ EJB3 Connectors
+
+ For use in EJBTHREE-994 Tests
+
+-->
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+
+ <!--
+
+ Remoting
+
+ -->
+
+ <!-- Remoting Configuration -->
+ <bean name="ServerConfiguration-EJBTHREE994"
+ class="org.jboss.remoting.ServerConfiguration">
+ <property name="invocationHandlers">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry>
+ <key>AOP</key>
+ <value>
+ org.jboss.aspects.remoting.AOPRemotingInvocationHandler
+ </value>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+ <!-- Remoting Connectors -->
+
+ <bean name="org.jboss.ejb3.RemotingConnector-EJBTHREE994-2"
+ class="org.jboss.remoting.transport.Connector">
+ <property name="invokerLocator">socket://${jboss.bind.address}:3874</property>
+ <property name="serverConfiguration">
+ <inject bean="ServerConfiguration-EJBTHREE994" />
+ </property>
+ </bean>
+
+ <bean name="org.jboss.ejb3.RemotingConnector-EJBTHREE994-3"
+ class="org.jboss.remoting.transport.Connector">
+ <property name="invokerLocator">socket://${jboss.bind.address}:3875</property>
+ <property name="serverConfiguration">
+ <inject bean="ServerConfiguration-EJBTHREE994" />
+ </property>
+ </bean>
+
+</deployment>
\ No newline at end of file
Deleted: projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree994/ejbthree994-connectors-service.xml
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree994/ejbthree994-connectors-service.xml 2008-10-17 06:47:48 UTC (rev 79621)
+++ projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree994/ejbthree994-connectors-service.xml 2008-10-17 06:49:41 UTC (rev 79622)
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- JBoss EJB3Deployer
-
- $Id: ejbthree994-connectors-service.xml 63662 2007-06-27 08:18:23Z wolfc $
--->
-<server>
-
- <mbean code="org.jboss.remoting.transport.Connector"
- name="jboss.remoting:type=Connector,name=Ejbthree994Ejb3Connector,handler=ejb3">
- <attribute name="InvokerLocator">socket://${jboss.bind.address}:3874</attribute>
- <attribute name="Configuration">
- <handlers>
- <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
- </handlers>
- </attribute>
- </mbean>
-
- <mbean code="org.jboss.remoting.transport.Connector"
- name="jboss.remoting.test:type=Connector,name=Ejbthree994TestEjb3Connector,handler=ejb3">
- <attribute name="InvokerLocator">socket://${jboss.bind.address}:3875</attribute>
- <attribute name="Configuration">
- <handlers>
- <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
- </handlers>
- </attribute>
- </mbean>
-
-
-</server>
More information about the jboss-cvs-commits
mailing list