[jbossws-commits] JBossWS SVN: r19120 - in stack/cxf/branches/arquillian/modules: testsuite and 6 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Tue Dec 2 11:55:08 EST 2014


Author: asoldano
Date: 2014-12-02 11:55:07 -0500 (Tue, 02 Dec 2014)
New Revision: 19120

Modified:
   stack/cxf/branches/arquillian/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
   stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/pom.xml
   stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/etc/arquillian.xml
   stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/OasisCatalogHelloWSTestCase.java
   stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3792/wsImpl/JBWS3792WsImplTestCase.java
   stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3792/wsdlImportEpsilon/JBWS3792EpsilonTestCase.java
   stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-default-config-tests.groovy
   stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-default.groovy
   stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-ssl-mutual-auth.groovy
   stack/cxf/branches/arquillian/modules/testsuite/pom.xml
Log:
Fixed logging + misc issues


Modified: stack/cxf/branches/arquillian/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- stack/cxf/branches/arquillian/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java	2014-12-02 12:09:52 UTC (rev 19119)
+++ stack/cxf/branches/arquillian/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java	2014-12-02 16:55:07 UTC (rev 19120)
@@ -417,7 +417,7 @@
 
       public T writeToFile()
       {
-         File archiveDir = assertArchiveDirExists(JBossWSTestHelper.getTestArchiveDir());
+         File archiveDir = assertArchiveDirExists();
          File file = new File(archiveDir, archive.getName());
          archive.as(ZipExporter.class).exportTo(file, true);
          return archive;
@@ -427,21 +427,21 @@
       {
          return archive.getName();
       }
-
-      private File assertArchiveDirExists(String testArchiveDir)
+   }
+   
+   public static File assertArchiveDirExists()
+   {
+      File archiveDir = new File(testArchiveDir);
+      if (!archiveDir.exists())
       {
-         File archiveDir = new File(testArchiveDir);
-         if (!archiveDir.exists())
-         {
-            if (testArchiveDir == null)
-               throw new IllegalArgumentException("Cannot create archive - system property '"
-                     + JBossWSTestHelper.SYSPROP_TEST_ARCHIVE_DIRECTORY + "' not set.");
-            if (!archiveDir.mkdirs())
-               throw new IllegalArgumentException("Cannot create archive - can not create test archive directory '"
-                  + archiveDir.getAbsolutePath() + "' not set.");
-         }
-         return archiveDir;
+         if (testArchiveDir == null)
+            throw new IllegalArgumentException("Cannot create archive - system property '"
+                  + JBossWSTestHelper.SYSPROP_TEST_ARCHIVE_DIRECTORY + "' not set.");
+         if (!archiveDir.mkdirs())
+            throw new IllegalArgumentException("Cannot create archive - can not create test archive directory '"
+               + archiveDir.getAbsolutePath() + "' not set.");
       }
+      return archiveDir;
    }
    
    public static String writeToFile(BaseDeployment<?>... deps) {

Modified: stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/pom.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/pom.xml	2014-12-02 12:09:52 UTC (rev 19119)
+++ stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/pom.xml	2014-12-02 16:55:07 UTC (rev 19120)
@@ -83,6 +83,7 @@
                   <properties>
                     <inputFile>${jboss.home}/standalone/configuration/standalone.xml</inputFile>
                     <outputFile>${jboss.home}/standalone/configuration/jbws-testsuite-default.xml</outputFile>
+                    <serverLog>jbws-testsuite-default.log</serverLog>
                     <usersPropFile>${project.build.directory}/test-classes/jbossws-users.properties</usersPropFile>
                     <rolesPropFile>${project.build.directory}/test-classes/jbossws-roles.properties</rolesPropFile>
                     <keystorePath>${project.build.directory}/test-classes/test.keystore</keystorePath>
@@ -101,6 +102,7 @@
                   <properties>
                     <inputFile>${jboss.home}/standalone/configuration/standalone.xml</inputFile>
                     <outputFile>${jboss.home}/standalone/configuration/jbws-testsuite-ssl-mutual-auth.xml</outputFile>
+                    <serverLog>jbws-testsuite-ssl-mutual-auth.log</serverLog>
                     <keystorePath>${project.build.directory}/test-classes/test.keystore</keystorePath>
                     <truststorePath>${project.build.directory}/test-classes/test.truststore</truststorePath>
                   </properties>
@@ -117,6 +119,7 @@
                   <properties>
                     <inputFile>${jboss.home}/standalone/configuration/standalone.xml</inputFile>
                     <outputFile>${jboss.home}/standalone/configuration/jbws-testsuite-default-config-tests.xml</outputFile>
+                    <serverLog>jbws-testsuite-default-config-tests.log</serverLog>
                   </properties>
                 </configuration>
               </execution>

Modified: stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/etc/arquillian.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/etc/arquillian.xml	2014-12-02 12:09:52 UTC (rev 19119)
+++ stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/etc/arquillian.xml	2014-12-02 16:55:07 UTC (rev 19120)
@@ -6,14 +6,9 @@
     <container qualifier="jboss" default="true">
         <configuration>
             <property name="jbossHome">${jboss.home}</property>
-            <!-- <property name="javaVmArguments">${server.jvm.args} -Djboss.inst=${basedir}/target/jbossas -Dtest.bind.address=${node0}</property> -->
             <property name="serverConfig">jbws-testsuite-default.xml</property>
-            <!-- -Djboss.inst is not necessarily needed, only in case the test case neeeds path to the instance it runs in.
-                 In the future, Arquillian should capable of injecting it into @ArquillianResource File or such. -->
             <property name="allowConnectingToRunningServer">true</property>
-            <!-- <property name="managementAddress">${node0:127.0.0.1}</property> -->
             <property name="managementPort">${as.managementPort:9990}</property>
-
             <!-- AS7-4070 -->
             <property name="waitForPorts">${as.debug.port:8787} ${as.managementPort:9990}</property>
             <property name="waitForPortsTimeoutInSeconds">8</property>
@@ -22,15 +17,10 @@
     <container qualifier="ssl-mutual-auth" mode="manual">
         <configuration>
             <property name="jbossHome">${jboss.home}</property>
-            <property name="javaVmArguments">-Djboss.socket.binding.port-offset=10000</property>
-            <!-- <property name="javaVmArguments">${server.jvm.args} -Djboss.inst=${basedir}/target/jbossas -Dtest.bind.address=${node0}</property> -->
+            <property name="javaVmArguments">-server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djboss.socket.binding.port-offset=10000</property>
             <property name="serverConfig">jbws-testsuite-ssl-mutual-auth.xml</property>
-            <!-- -Djboss.inst is not necessarily needed, only in case the test case neeeds path to the instance it runs in.
-                 In the future, Arquillian should capable of injecting it into @ArquillianResource File or such. -->
             <property name="allowConnectingToRunningServer">true</property>
-            <!-- <property name="managementAddress">${node0:127.0.0.1}</property> -->
             <property name="managementPort">${as.managementPort:19990}</property>
-
             <!-- AS7-4070 -->
             <property name="waitForPorts">${as.debug.port:18787} ${as.managementPort:19990}</property>
             <property name="waitForPortsTimeoutInSeconds">8</property>
@@ -39,15 +29,10 @@
     <container qualifier="default-config-tests" mode="manual">
         <configuration>
             <property name="jbossHome">${jboss.home}</property>
-            <property name="javaVmArguments">-Djboss.socket.binding.port-offset=20000</property>
-            <!-- <property name="javaVmArguments">${server.jvm.args} -Djboss.inst=${basedir}/target/jbossas -Dtest.bind.address=${node0}</property> -->
+            <property name="javaVmArguments">-server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djboss.socket.binding.port-offset=20000</property>
             <property name="serverConfig">jbws-testsuite-default-config-tests.xml</property>
-            <!-- -Djboss.inst is not necessarily needed, only in case the test case neeeds path to the instance it runs in.
-                 In the future, Arquillian should capable of injecting it into @ArquillianResource File or such. -->
             <property name="allowConnectingToRunningServer">true</property>
-            <!-- <property name="managementAddress">${node0:127.0.0.1}</property> -->
             <property name="managementPort">${as.managementPort:29990}</property>
-
             <!-- AS7-4070 -->
             <property name="waitForPorts">${as.debug.port:28787} ${as.managementPort:29990}</property>
             <property name="waitForPortsTimeoutInSeconds">8</property>

Modified: stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/OasisCatalogHelloWSTestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/OasisCatalogHelloWSTestCase.java	2014-12-02 12:09:52 UTC (rev 19119)
+++ stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/OasisCatalogHelloWSTestCase.java	2014-12-02 16:55:07 UTC (rev 19120)
@@ -168,6 +168,7 @@
    
    public static void writeToDisk(WebArchive archive)
    {
+      JBossWSTestHelper.assertArchiveDirExists();
       File file = new File(JBossWSTestHelper.getTestArchiveDir(), archive.getName());
       archive.as(ZipExporter.class).exportTo(file, true);
    }

Modified: stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3792/wsImpl/JBWS3792WsImplTestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3792/wsImpl/JBWS3792WsImplTestCase.java	2014-12-02 12:09:52 UTC (rev 19119)
+++ stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3792/wsImpl/JBWS3792WsImplTestCase.java	2014-12-02 16:55:07 UTC (rev 19120)
@@ -58,7 +58,7 @@
    @ArquillianResource
    private URL baseURL;
    
-   @Deployment(name = DEP_EXT, testable = false)
+   @Deployment(name = DEP_EXT, testable = false, order = 1)
    public static WebArchive createDeployment() {
       WebArchive archive = ShrinkWrap.create(WebArchive.class, DEP_EXT + ".war");
       archive
@@ -69,7 +69,7 @@
       return archive;
    }
 
-   @Deployment(name = DEP, testable = false)
+   @Deployment(name = DEP, testable = false, order = 2)
    public static WebArchive createDeployment2() {
       WebArchive archive = ShrinkWrap.create(WebArchive.class, DEP + ".war");
       archive.setManifest(new StringAsset("Manifest-Version: 1.0\n"

Modified: stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3792/wsdlImportEpsilon/JBWS3792EpsilonTestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3792/wsdlImportEpsilon/JBWS3792EpsilonTestCase.java	2014-12-02 12:09:52 UTC (rev 19119)
+++ stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3792/wsdlImportEpsilon/JBWS3792EpsilonTestCase.java	2014-12-02 16:55:07 UTC (rev 19120)
@@ -57,7 +57,7 @@
    @ArquillianResource
    private URL baseURL;
    
-   @Deployment(name = DEP1, testable = false)
+   @Deployment(name = DEP1, testable = false, order = 1)
    public static WebArchive createDeployment() {
       WebArchive archive = ShrinkWrap.create(WebArchive.class, DEP1 + ".war");
       archive.setManifest(new StringAsset("Manifest-Version: 1.0\n"
@@ -71,7 +71,7 @@
       return archive;
    }
 
-   @Deployment(name = DEP2, testable = false)
+   @Deployment(name = DEP2, testable = false, order = 2)
    public static WebArchive createDeployment2() {
       WebArchive archive = ShrinkWrap.create(WebArchive.class, DEP2 + ".war");
       archive.setManifest(new StringAsset("Manifest-Version: 1.0\n"

Modified: stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-default-config-tests.groovy
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-default-config-tests.groovy	2014-12-02 12:09:52 UTC (rev 19119)
+++ stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-default-config-tests.groovy	2014-12-02 16:55:07 UTC (rev 19120)
@@ -1,6 +1,16 @@
 def root = new XmlParser().parse(project.properties['inputFile'])
 
 /**
+ * Fix logging: remove CONSOLE handler and set a specific log file
+ *
+ */
+def logHandlers = root.profile.subsystem.'root-logger'.handlers[0]
+def consoleHandler = logHandlers.find{it. at name == 'CONSOLE'}
+logHandlers.remove(consoleHandler)
+def file = root.profile.subsystem.'periodic-rotating-file-handler'.file[0]
+file.attributes()['path'] = project.properties['serverLog']
+
+/**
  * Add a security-domain block like this:
  *
  * <security-domain name="JBossWS" cache-type="default">

Modified: stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-default.groovy
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-default.groovy	2014-12-02 12:09:52 UTC (rev 19119)
+++ stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-default.groovy	2014-12-02 16:55:07 UTC (rev 19120)
@@ -1,6 +1,16 @@
 def root = new XmlParser().parse(project.properties['inputFile'])
 
 /**
+ * Fix logging: remove CONSOLE handler and set a specific log file
+ *
+ */
+def logHandlers = root.profile.subsystem.'root-logger'.handlers[0]
+def consoleHandler = logHandlers.find{it. at name == 'CONSOLE'}
+logHandlers.remove(consoleHandler)
+def file = root.profile.subsystem.'periodic-rotating-file-handler'.file[0]
+file.attributes()['path'] = project.properties['serverLog']
+
+/**
  * Add a security-domain block like this:
  *
  * <security-domain name="JBossWS" cache-type="default">

Modified: stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-ssl-mutual-auth.groovy
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-ssl-mutual-auth.groovy	2014-12-02 12:09:52 UTC (rev 19119)
+++ stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-ssl-mutual-auth.groovy	2014-12-02 16:55:07 UTC (rev 19120)
@@ -1,6 +1,16 @@
 def root = new XmlParser().parse(project.properties['inputFile'])
 
 /**
+ * Fix logging: remove CONSOLE handler and set a specific log file
+ *
+ */
+def logHandlers = root.profile.subsystem.'root-logger'.handlers[0]
+def consoleHandler = logHandlers.find{it. at name == 'CONSOLE'}
+logHandlers.remove(consoleHandler)
+def file = root.profile.subsystem.'periodic-rotating-file-handler'.file[0]
+file.attributes()['path'] = project.properties['serverLog']
+
+/**
  * Add a https connector like this:
  *
  *   <security-realm name="jbws-test-https-realm">

Modified: stack/cxf/branches/arquillian/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/pom.xml	2014-12-02 12:09:52 UTC (rev 19119)
+++ stack/cxf/branches/arquillian/modules/testsuite/pom.xml	2014-12-02 16:55:07 UTC (rev 19120)
@@ -38,7 +38,7 @@
   <!-- Modules -->
   <modules>
     <module>cxf-tests</module>
-    <module>shared-tests</module>
+<!--    <module>shared-tests</module>-->
   </modules>
 
   <!-- Dependencies -->



More information about the jbossws-commits mailing list