[jboss-cvs] JBossAS SVN: r77837 - in trunk/testsuite: imports and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Sep 3 04:58:20 EDT 2008


Author: adrian at jboss.org
Date: 2008-09-03 04:58:19 -0400 (Wed, 03 Sep 2008)
New Revision: 77837

Added:
   trunk/testsuite/src/resources/test-configs/web-profile/deploy/
   trunk/testsuite/src/resources/test-configs/web-profile/deploy/jmx-invoker-service.xml
Modified:
   trunk/testsuite/build.xml
   trunk/testsuite/imports/server-config.xml
Log:
[JBAS-5897] - Add an MBeanServerConnection running over HTTP for deploying tests and pass the http jndi url when stopping the server - hacked see JBASM-12. Now the tests are working, I've added the web-profile tests to the main JBossAS testsuite run.

Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml	2008-09-03 08:51:45 UTC (rev 77836)
+++ trunk/testsuite/build.xml	2008-09-03 08:58:19 UTC (rev 77837)
@@ -58,11 +58,13 @@
    <property name="node0.http.url" value="http://${node0}:8080" />
    <property name="node0.jndi.url" value="jnp://${node0}:1099" />
    <property name="node0.hajndi.url" value="jnp://${node0}:1100" />
+   <property name="node0.jndi.http.url" value="http://${node0}:8080/invoker/JNDIFactory" />
    <!-- Cluster node1 defaults -->
    <property name="node1" value="${hostname}" />
    <property name="node1.http.url" value="http://${node1}:8080" />
    <property name="node1.jndi.url" value="jnp://${node1}:1099" />
    <property name="node1.hajndi.url" value="jnp://${node1}:1100" />
+   <property name="node1.jndi.http.url" value="http://${node1}:8080/invoker/JNDIFactory" />
 
    <!-- UDP Group -->
    <!-- The value of the -u option passed to jboss -->
@@ -952,6 +954,7 @@
       <antcall target="tests-classloader-leak"/>
       <antcall target="tests-clustered-classloader-leak"/>
       <antcall target="tests-clustered-profileservice"/>
+      <antcall target="tests-web-profile"/>
       <antcall target="tests-report"/>
    	<!--
       <record name="output/tests.log" action="stop"/>
@@ -1024,6 +1027,9 @@
    <target name="tests-web-profile" description="Tests with the web profile">
       <create-web-profile-config conf="web-profile"/>
       <server:start name="web-profile"/>
+      <antcall target="run-web-profile-unit"/>
+      <!-- FIXME need to fix server:stop -->
+      <stop-jboss url="${node0.jndi.http.url}"/>
       <server:stop name="web-profile"/>
    </target>
    
@@ -1352,6 +1358,65 @@
       </junit>
    </target>
 
+  <!--
+     Web Profile Tests
+  -->
+  <target name="run-web-profile-unit" depends="init">
+      <echo><![CDATA[
+   junit.timeout:              ${junit.timeout}
+   jbosstest.iterationcount:   ${jbosstest.iterationcount}
+   jbosstest.threadcount:      ${jbosstest.threadcount}
+   jbosstest.beancount:        ${jbosstest.beancount}
+         ]]></echo>
+      <mkdir dir="${build.reports}"/>
+      <mkdir dir="${build.testlog}"/>
+      <junit dir="${module.output}"
+         printsummary="${junit.printsummary}"
+         haltonerror="${junit.haltonerror}"
+         haltonfailure="${junit.haltonfailure}"
+         fork="${junit.fork}"
+         timeout="${junit.timeout}"
+         jvm="${junit.jvm}">
+
+         <jvmarg line="${junit.jvm.options}"/>
+         <!-- Seam deployment tests need more memory -->
+         <jvmarg value="-Xmx256m"/>
+         <!-- Used for JGroups -->
+         <jvmarg value="-Dbind.address=${node0}"/>
+         <sysproperty key="jboss.dist" value="${jboss.dist}"/>
+         <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
+         <sysproperty key="build.testlog" value="${build.testlog}"/>
+         <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
+         <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
+         <sysproperty key="java.naming.factory.initial" value="org.jboss.naming.HttpNamingContextFactory"/>
+         <sysproperty key="java.naming.provider.url" value="${node0.jndi.http.url}"/>
+         <sysproperty key="jbosstest.server.host" value="${node0}"/>
+         <sysproperty key="jbosstest.useJBM" value="true"/>
+
+      	 <!-- Pass along any jbosstest.* system properties -->
+         <syspropertyset>
+            <propertyref prefix="jbosstest."/>
+         </syspropertyset>
+         <classpath>
+            <pathelement location="${build.classes}"/>
+            <pathelement location="${build.resources}"/>
+            <path refid="tests.classpath"/>
+         </classpath>
+
+         <formatter type="xml" usefile="${junit.formatter.usefile}" extension="-web-profile.xml"/>
+
+         <batchtest todir="${build.reports}"
+            haltonerror="${junit.batchtest.haltonerror}"
+            haltonfailure="${junit.batchtest.haltonfailure}"
+            fork="${junit.batchtest.fork}">
+
+            <fileset dir="${build.classes}">
+               <include name="org/jboss/test/jpa/test/*UnitTestCase.class"/>
+            </fileset>
+         </batchtest>
+      </junit>
+   </target>
+
    <!--
       | Standard tests that should run successfully against a default JBoss
       | server distribution build.

Modified: trunk/testsuite/imports/server-config.xml
===================================================================
--- trunk/testsuite/imports/server-config.xml	2008-09-03 08:51:45 UTC (rev 77836)
+++ trunk/testsuite/imports/server-config.xml	2008-09-03 08:58:19 UTC (rev 77837)
@@ -928,6 +928,7 @@
             <include name="deploy/jbossweb.sar/**"/>
             <include name="deploy/jboss-xa-jdbc.rar"/>
             <include name="deploy/jmx-console.war/**"/>
+            <include name="deploy/http-invoker.sar/**"/>
             <include name="deploy/ROOT.war/**"/>
             <include name="deploy/security/**"/>
             <include name="deploy/transaction-jboss-beans.xml"/>

Added: trunk/testsuite/src/resources/test-configs/web-profile/deploy/jmx-invoker-service.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/web-profile/deploy/jmx-invoker-service.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/web-profile/deploy/jmx-invoker-service.xml	2008-09-03 08:58:19 UTC (rev 77837)
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id: jboss-service.xml 59451 2007-01-09 19:13:25Z dimitris at jboss.org $ -->
+<server>
+
+   <!-- The HTTP invoker proxy configuration for the InvokerAdaptorService -->
+   <mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
+      name="jboss.jmx:type=adaptor,name=Invoker,protocol=http,service=proxyFactory">
+      <!-- Use the HTTP Invoker from conf/jboss-service.xxml -->
+      <depends optional-attribute-name="InvokerName">jboss:service=invoker,type=http</depends>
+      <!-- The target MBean is the InvokerAdaptorService configured below -->
+      <depends optional-attribute-name="TargetName">jboss.jmx:type=adaptor,name=Invoker</depends>
+      <!-- Where to bind the RMIAdaptor proxy -->
+      <attribute name="JndiName">jmx/invoker/RMIAdaptor</attribute>
+      <!-- The RMI compabitle MBeanServer interface -->
+      <attribute name="ExportedInterfaces">org.jboss.jmx.adaptor.rmi.RMIAdaptor,
+         org.jboss.jmx.adaptor.rmi.RMIAdaptorExt
+      </attribute>
+      <attribute name="ClientInterceptors">
+          <interceptors>
+             <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
+             <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
+             <interceptor>org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor</interceptor>
+             <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
+          </interceptors>
+      </attribute>
+      <depends>jboss:service=Naming</depends>
+   </mbean>
+
+   <!--
+      Choose the remote proxy to expose mbean proxies over
+   -->
+   <mbean code="org.jboss.jmx.connector.invoker.MBeanProxyRemote"
+          name="jboss.jmx:type=adaptor,name=MBeanProxyRemote,protocol=jrmp">
+      <depends optional-attribute-name="MBeanServerConnection">jboss.jmx:type=adaptor,name=Invoker,protocol=http,service=proxyFactory</depends>
+   </mbean>
+
+   <!-- Create a mapping from the legacy jmx-rmi-adaptor.sar binding to the
+   jmx-invoker-adaptor-server.sar JndiName specified above for backwards
+   portability.
+   -->
+   <mbean code="org.jboss.naming.NamingAlias" name="jboss.jmx:alias=jmx/rmi/RMIAdaptor">
+      <attribute name="FromName">jmx/rmi/RMIAdaptor</attribute>
+      <attribute name="ToName">jmx/invoker/RMIAdaptor</attribute>
+      <depends>jboss:service=Naming</depends>
+   </mbean>
+
+   <!-- This is the service that handles the RMIAdaptor invocations by routing
+   them to the MBeanServer the service is deployed under.  -->
+   <mbean code="org.jboss.jmx.connector.invoker.InvokerAdaptorService"
+          name="jboss.jmx:type=adaptor,name=Invoker"
+      xmbean-dd="">
+      <xmbean>
+         <description>The JMX Detached Invoker Service</description>
+         <class>org.jboss.jmx.connector.invoker.InvokerAdaptorService</class>
+
+         <!-- Attributes -->
+         <attribute access="read-only" getMethod="getName">
+            <description>The class name of the MBean</description>
+            <name>Name</name>
+            <type>java.lang.String</type>
+         </attribute>
+         <attribute access="read-only" getMethod="getState">
+            <description>The status of the MBean</description>
+            <name>State</name>
+            <type>int</type>
+         </attribute>
+         <attribute access="read-only" getMethod="getStateString">
+         <description>The status of the MBean in text form</description>
+            <name>StateString</name>
+            <type>java.lang.String</type>
+         </attribute>
+         <attribute access="read-write" getMethod="getExportedInterfaces" setMethod="setExportedInterfaces">
+            <description>The interfaces the invoker proxy supports</description>
+            <name>ExportedInterfaces</name>
+            <type>[Ljava.lang.Class;</type>
+         </attribute>
+         <attribute access="read-only" getMethod="getMethodMap">
+            <description>Map(Long hash, Method) of the proxy interface methods</description>
+            <name>MethodMap</name>
+            <type>java.util.Map</type>
+         </attribute>
+         <!-- Operations -->
+         <operation>
+            <description>The start lifecycle operation</description>
+            <name>start</name>
+         </operation>
+         <operation>
+            <description>The stop lifecycle operation</description>
+            <name>stop</name>
+         </operation>
+         <operation>
+            <description>The detyped lifecycle operation (for internal use only)</description>
+            <name>jbossInternalLifecycle</name>
+            <parameter>
+               <description>The lifecycle operation</description>
+               <name>method</name>
+               <type>java.lang.String</type>
+            </parameter>
+            <return-type>void</return-type>
+         </operation>
+
+         <operation>
+            <description>The detached invoker entry point</description>
+            <name>invoke</name>
+            <parameter>
+               <description>The method invocation context</description>
+               <name>invocation</name>
+               <type>org.jboss.invocation.Invocation</type>
+            </parameter>
+            <return-type>java.lang.Object</return-type>
+            <descriptors>
+               <interceptors>
+                  <!-- Uncomment to require authenticated users
+                  <interceptor code="org.jboss.jmx.connector.invoker.AuthenticationInterceptor"
+                     securityDomain="java:/jaas/jmx-console"/>
+                  -->               
+                  <!-- Interceptor that deals with non-serializable results -->
+                  <interceptor code="org.jboss.jmx.connector.invoker.SerializableInterceptor"
+                     policyClass="StripModelMBeanInfoPolicy"/>
+               </interceptors>
+            </descriptors>            
+         </operation>
+      </xmbean>
+      
+      <attribute name="ExportedInterfaces">org.jboss.jmx.adaptor.rmi.RMIAdaptor,
+         org.jboss.jmx.adaptor.rmi.RMIAdaptorExt
+      </attribute>
+   </mbean>
+
+</server>




More information about the jboss-cvs-commits mailing list