[jbossws-commits] JBossWS SVN: r19457 - in stack/cxf/trunk/modules: dist/src/main/scripts and 4 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Fri Feb 13 10:54:23 EST 2015


Author: asoldano
Date: 2015-02-13 10:54:23 -0500 (Fri, 13 Feb 2015)
New Revision: 19457

Removed:
   stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/CleanupOperation.java
   stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSCXFTestSetup.java
   stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java
Modified:
   stack/cxf/trunk/modules/dist/pom.xml
   stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
   stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTest.java
   stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
   stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyTestCaseForked.java
   stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/enventry/EnvEntryServletTestCase.java
   stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java
Log:
[JBWS-3668] Removing old deploy/undeploy mechanism and cleaning up a bunch of stuff not used anymore


Modified: stack/cxf/trunk/modules/dist/pom.xml
===================================================================
--- stack/cxf/trunk/modules/dist/pom.xml	2015-02-13 15:37:58 UTC (rev 19456)
+++ stack/cxf/trunk/modules/dist/pom.xml	2015-02-13 15:54:23 UTC (rev 19457)
@@ -235,11 +235,6 @@
           <artifactId>jbossws-wildfly800-server-integration</artifactId>
           <scope>provided</scope>
         </dependency>
-        <dependency>
-           <groupId>org.jboss.ws</groupId>
-           <artifactId>jbossws-wildfly800-tests-integration</artifactId>
-           <scope>provided</scope>
-        </dependency>
       </dependencies>
     </profile>
 
@@ -261,11 +256,6 @@
           <artifactId>jbossws-wildfly810-server-integration</artifactId>
           <scope>provided</scope>
         </dependency>
-        <dependency>
-           <groupId>org.jboss.ws</groupId>
-           <artifactId>jbossws-wildfly810-tests-integration</artifactId>
-           <scope>provided</scope>
-        </dependency>
       </dependencies>
     </profile>
     
@@ -287,11 +277,6 @@
           <artifactId>jbossws-wildfly820-server-integration</artifactId>
           <scope>provided</scope>
         </dependency>
-        <dependency>
-           <groupId>org.jboss.ws</groupId>
-           <artifactId>jbossws-wildfly820-tests-integration</artifactId>
-           <scope>provided</scope>
-        </dependency>
       </dependencies>
     </profile>
     

Modified: stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml	2015-02-13 15:37:58 UTC (rev 19456)
+++ stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml	2015-02-13 15:54:23 UTC (rev 19457)
@@ -107,17 +107,6 @@
             <outputDirectory>deploy-artifacts/lib</outputDirectory>
             <unpack>false</unpack>
             <includes>
-              <include>org.jboss.ws:jbossws-wildfly*-tests-integration:jar</include>
-            </includes>
-            <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
-            <scope>provided</scope>
-            <useProjectArtifact>false</useProjectArtifact>
-         </dependencySet>
-
-         <dependencySet>
-            <outputDirectory>deploy-artifacts/lib</outputDirectory>
-            <unpack>false</unpack>
-            <includes>
               <include>org.jboss.ws:jbossws-wildfly*-server-integration:jar</include>
               <include>org.picketbox:picketbox:jar</include>
             </includes>

Deleted: stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/CleanupOperation.java
===================================================================
--- stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/CleanupOperation.java	2015-02-13 15:37:58 UTC (rev 19456)
+++ stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/CleanupOperation.java	2015-02-13 15:54:23 UTC (rev 19457)
@@ -1,27 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2012, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.test;
-
-public interface CleanupOperation
-{
-    void cleanUp();
-}

Deleted: stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSCXFTestSetup.java
===================================================================
--- stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSCXFTestSetup.java	2015-02-13 15:37:58 UTC (rev 19456)
+++ stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSCXFTestSetup.java	2015-02-13 15:54:23 UTC (rev 19457)
@@ -1,120 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2012, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.test;
-
-import junit.framework.Test;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.jboss.logging.Logger;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * 
- * @author alessio.soldano at jboss.com
- */
-public class JBossWSCXFTestSetup extends JBossWSTestSetup
-{
-   private Bus defaultBus;
-   
-   public JBossWSCXFTestSetup(Class<?> testClass, String archiveList)
-   {
-      super(testClass, archiveList);
-   }
-   
-   public JBossWSCXFTestSetup(Class<?> testClass, String archiveList, boolean requiresDefaultSecurityDomain)
-   {
-      super(testClass, archiveList, requiresDefaultSecurityDomain);
-   }
-
-   public JBossWSCXFTestSetup(Test test, String archiveList)
-   {
-      super(test, archiveList);
-   }
-   
-   public JBossWSCXFTestSetup(Test test, String archiveList, boolean requiresDefaultSecurityDomain)
-   {
-      super(test, archiveList, requiresDefaultSecurityDomain);
-   }
-   
-   public JBossWSCXFTestSetup(Class<?> testClass, String archiveList, boolean requiresDefaultSecurityDomain, CleanupOperation cleanupOp)
-   {
-      super(testClass, archiveList, requiresDefaultSecurityDomain, cleanupOp);
-   }
-
-   public JBossWSCXFTestSetup(Test test)
-   {
-      super(test);
-   }
-   
-   @Override
-   protected void setUp() throws Exception {
-      defaultBus = BusFactory.getDefaultBus(false);
-      super.setUp();
-      Bus threadBus = BusFactory.getThreadDefaultBus(false);
-      if (threadBus != null)
-      {
-         ClassLoader busLoader = threadBus.getExtension(ClassLoader.class);
-         ClassLoader origLoader = this.getOriginalClassLoader();
-         //overwrite the ClassLoader extension with the new TCCL, to allow CXF seeing the client side archives
-         if (busLoader != null && busLoader == origLoader)
-         {
-            threadBus.setExtension(Thread.currentThread().getContextClassLoader(), ClassLoader.class);
-         }
-      }
-   }
-   
-   @Override
-   protected void tearDown() throws Exception {
-      Bus threadBus = BusFactory.getThreadDefaultBus(false);
-      if (threadBus != null)
-      {
-         ClassLoader busLoader = threadBus.getExtension(ClassLoader.class);
-         ClassLoader origLoader = this.getOriginalClassLoader();
-         //restore the ClassLoader extension to the orig loader
-         if (busLoader != null && busLoader == Thread.currentThread().getContextClassLoader())
-         {
-            threadBus.setExtension(origLoader, ClassLoader.class);
-         }
-      }
-      
-      try
-      {
-         Bus afterTestsDefaultBus = BusFactory.getDefaultBus(false);
-         
-         if (defaultBus == null && afterTestsDefaultBus != null)
-         {
-            Logger.getLogger(this.getClass()).info("Default CXF bus has been set during test execution");
-         }
-         else if (defaultBus != afterTestsDefaultBus)
-         {
-            throw new Exception("CXF Default bus changed during test: \nBEFORE: " + defaultBus + "\nAFTER: "
-                  + afterTestsDefaultBus);
-         }
-      }
-      finally
-      {
-         defaultBus = null; //remove reference, to help GC
-         super.tearDown();
-      }
-   }
-}

Modified: stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTest.java
===================================================================
--- stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTest.java	2015-02-13 15:37:58 UTC (rev 19456)
+++ stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTest.java	2015-02-13 15:54:23 UTC (rev 19457)
@@ -1,6 +1,6 @@
 /*
  * JBoss, Home of Professional Open Source.
- * Copyright 2014, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2015, Red Hat Middleware LLC, and individual contributors
  * as indicated by the @author tags. See the copyright.txt file in the
  * distribution for a full listing of individual contributors.
  *
@@ -212,16 +212,6 @@
       return JBossWSTestHelper.isIntegrationCXF();
    }
 
-   public static void deploy(String archive) throws Exception
-   {
-      JBossWSTestHelper.deploy(archive);
-   }
-
-   public static void undeploy(String archive) throws Exception
-   {
-      JBossWSTestHelper.undeploy(archive);
-   }
-
    public static String getServerHost()
    {
       return JBossWSTestHelper.getServerHost();

Modified: stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java	2015-02-13 15:37:58 UTC (rev 19456)
+++ stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java	2015-02-13 15:54:23 UTC (rev 19457)
@@ -1,6 +1,6 @@
 /*
  * JBoss, Home of Professional Open Source.
- * Copyright 2014, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2015, Red Hat Middleware LLC, and individual contributors
  * as indicated by the @author tags. See the copyright.txt file in the
  * distribution for a full listing of individual contributors.
  *
@@ -32,9 +32,8 @@
 import java.net.UnknownHostException;
 import java.util.Hashtable;
 import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
 import java.util.Map.Entry;
+import java.util.Properties;
 import java.util.WeakHashMap;
 
 import javax.management.MBeanServerConnection;
@@ -52,9 +51,6 @@
 import org.jboss.shrinkwrap.api.exporter.ZipExporter;
 import org.jboss.shrinkwrap.api.spec.JavaArchive;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.deployer.Deployer;
 
 /**
  * A JBossWS test helper that deals with test deployment/undeployment, etc.
@@ -75,15 +71,12 @@
    private static final String SYSPROP_AS_SERVER_CONN_RETRIEVAL_ATTEMPTS = "test.as.server.connection.retrieval.attempts";
    private static final String TEST_USERNAME = "test.username";
    private static final String TEST_PASSWORD = "test.password";
-   private static final boolean DEPLOY_PROCESS_ENABLED = !Boolean.getBoolean("disable.test.archive.deployment");
    private static final int AS_SERVER_CONN_RETRIEVAL_ATTEMPTS = Integer.getInteger(SYSPROP_AS_SERVER_CONN_RETRIEVAL_ATTEMPTS, 5);
    private static final String testArchiveDir = System.getProperty(SYSPROP_TEST_ARCHIVE_DIRECTORY);
    private static final String testResourcesDir = System.getProperty(SYSPROP_TEST_RESOURCES_DIRECTORY);
    private static final String integrationTarget;
    private static final String implInfo;
 
-   private static volatile Deployer deployer;
-   
    private static WeakHashMap<ClassLoader, Hashtable<String, String>> containerEnvs = new WeakHashMap<ClassLoader, Hashtable<String,String>>();
 
    static {
@@ -94,55 +87,12 @@
       implInfo = obj.getClass().getPackage().getName();
    }
 
-   private static Deployer getDeployer()
-   {
-      //lazy loading of deployer
-      if (deployer == null)
-      {
-         synchronized (JBossWSTestHelper.class)
-         {
-            if (deployer == null)
-            {
-               SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
-               deployer = spiProvider.getSPI(Deployer.class);
-            }
-         }
-      }
-      return deployer;
-   }
-
-   /** Deploy the given archive to the server
-    */
-   public static void deploy(final String archive) throws Exception
-   {
-      if (DEPLOY_PROCESS_ENABLED)
-      {
-         URL archiveURL = getArchiveFile(archive).toURI().toURL();
-         getDeployer().deploy(archiveURL);
-      }
-   }
-
-   /** Undeploy the given archive from the server
-    */
-   public static void undeploy(final String archive) throws Exception
-   {
-      if (DEPLOY_PROCESS_ENABLED)
-      {
-         URL archiveURL = getArchiveFile(archive).toURI().toURL();
-         getDeployer().undeploy(archiveURL);
-      }
-   }
-
    /** Deploy the given archive to the appclient.
     * Archive name is always in form archive.ear#appclient.jar
     */
    public static Process deployAppclient(final String archive, final OutputStream appclientOS, final String... appclientArgs) throws Exception
    {
-      if (DEPLOY_PROCESS_ENABLED)
-      {
-         return AppclientHelper.deployAppclient(archive, appclientOS, appclientArgs);
-      }
-      return null;
+      return AppclientHelper.deployAppclient(archive, appclientOS, appclientArgs);
    }
 
    /** Undeploy the given archive from the appclient
@@ -150,10 +100,7 @@
     */
    public static void undeployAppclient(final String archive, boolean awaitShutdown) throws Exception
    {
-      if (DEPLOY_PROCESS_ENABLED)
-      {
-         AppclientHelper.undeployAppclient(archive, awaitShutdown);
-      }
+      AppclientHelper.undeployAppclient(archive, awaitShutdown);
    }
 
    public static boolean isTargetWildFly8()
@@ -431,43 +378,6 @@
       return prop;
    }
 
-   public static void addSecurityDomain(String name, Map<String,String> authenticationOptions) throws Exception
-   {
-      getDeployer().addSecurityDomain(name, authenticationOptions);
-   }
-
-   public static void addJaspiSecurityDomain(String name, String loginModuleStackName, Map<String, String> loginModuleOptions, String authModuleName,
-         Map<String, String> authModuleOptions) throws Exception
-   {
-      getDeployer().addJaspiSecurityDomain(name, loginModuleStackName, loginModuleOptions, authModuleName, authModuleOptions);
-   }
-
-
-   public static void removeSecurityDomain(String name) throws Exception
-   {
-      getDeployer().removeSecurityDomain(name);
-   }
-
-   public static void addHttpsConnector(Map<String, String> options) throws Exception
-   {
-      getDeployer().addHttpsConnector(options);
-   }
-
-   public static void removeHttpsConnector() throws Exception
-   {
-      getDeployer().removeHttpsConnector();
-   }
-
-   public static String setSystemProperty(String propName, String propValue) throws Exception
-   {
-      return getDeployer().setSystemProperty(propName, propValue);
-   }
-   
-   public static void restartServer() throws Exception
-   {
-      getDeployer().restart();
-   }
-   
    @SuppressWarnings("rawtypes")
    public static void writeToFile(Archive archive)
    {

Deleted: stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java
===================================================================
--- stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java	2015-02-13 15:37:58 UTC (rev 19456)
+++ stack/cxf/trunk/modules/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java	2015-02-13 15:54:23 UTC (rev 19457)
@@ -1,360 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2014, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.test;
-
-import java.io.File;
-import java.io.OutputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import javax.management.MBeanServerConnection;
-import javax.naming.NamingException;
-import javax.security.sasl.SaslException;
-
-import junit.extensions.TestSetup;
-import junit.framework.Protectable;
-import junit.framework.Test;
-import junit.framework.TestResult;
-import junit.framework.TestSuite;
-
-import org.jboss.logging.Logger;
-
-/**
- * A test setup that deploys/undeploys archives
- *
- * @author Thomas.Diesler at jboss.org
- * @author alessio.soldano at jboss.com
- * @since 14-Oct-2004
- */
-public class JBossWSTestSetup extends TestSetup
-{
-   // provide logging
-   private static Logger log = Logger.getLogger(JBossWSTestSetup.class);
-   
-   private static final String JBOSSWS_SEC_DOMAIN = "JBossWS";
-   private static final String SYSPROP_HTTPS_CONNECTION_REUSE_TIMEOUT = "test.https.connection.reuse.timeout";
-   private static final int HTTPS_CONNECTION_REUSE_TIMEOUT = Integer.getInteger(SYSPROP_HTTPS_CONNECTION_REUSE_TIMEOUT, 5000);
-
-   private String[] archives = new String[0];
-   private OutputStream appclientOutputStream;
-   private String appclientArg;
-   private ClassLoader originalClassLoader;
-   private Map<String, Map<String, String>> securityDomains;
-   private boolean defaultSecurityDomainRequirement = false;
-   private Map<String, String> httpsConnOptions;
-   private CleanupOperation cleanupOp;
-   
-   private static volatile long lastHttpsConnectorRemoval = 0;
-
-   public JBossWSTestSetup(Class<?> testClass, String archiveList)
-   {
-      super(new TestSuite(testClass));
-      getArchiveArray(archiveList);
-   }
-   
-   public JBossWSTestSetup(Class<?> testClass, String archiveList, CleanupOperation cleanupOp)
-   {
-      this(testClass, archiveList);
-      this.cleanupOp = cleanupOp;
-   }
-   
-   public JBossWSTestSetup(Class<?> testClass, String archiveList, OutputStream appclientOutputStream)
-   {
-      super(new TestSuite(testClass));
-      getArchiveArray(archiveList);
-      this.appclientOutputStream = appclientOutputStream;
-   }
-   
-   public JBossWSTestSetup(Class<?> testClass, String archiveList, boolean requiresDefaultSecurityDomain)
-   {
-      this(testClass, archiveList);
-      setDefaultSecurityDomainRequirement(requiresDefaultSecurityDomain);
-   }
-
-   public JBossWSTestSetup(Class<?> testClass, String archiveList, boolean requiresDefaultSecurityDomain, CleanupOperation cleanupOp)
-   {
-      this(testClass, archiveList, requiresDefaultSecurityDomain);
-      this.cleanupOp = cleanupOp;
-   }
-
-   public JBossWSTestSetup(Test test, String archiveList)
-   {
-      super(test);
-      getArchiveArray(archiveList);
-   }
-   
-   public JBossWSTestSetup(Test test, String archiveList, CleanupOperation cleanupOp)
-   {
-      this(test, archiveList);
-      this.cleanupOp = cleanupOp;
-   }
-   
-   public JBossWSTestSetup(Test test, String archiveList, boolean requiresDefaultSecurityDomain)
-   {
-      this(test, archiveList);
-      setDefaultSecurityDomainRequirement(requiresDefaultSecurityDomain);
-   }
-
-   public JBossWSTestSetup(Test test)
-   {
-      super(test);
-   }
-   
-   /**
-    * Override junit.extensions.TestSetup:run(TestResult result) to call cleanup operation
-    * before tearing down the whole test setup. Required for allowing tests to perform
-    * final cleanup of static references.
-    */
-   @Override
-   public void run(final TestResult result)
-   {
-      Protectable p = new Protectable()
-      {
-         public void protect() throws Exception
-         {
-            setUp();
-            basicRun(result);
-            if (cleanupOp != null) {
-               cleanupOp.cleanUp();
-            }
-            tearDown();
-         }
-      };
-      result.runProtected(this, p);
-   }
-
-   public File getArchiveFile(String archive)
-   {
-      return JBossWSTestHelper.getArchiveFile(archive);
-   }
-
-   public URL getArchiveURL(String archive) throws MalformedURLException
-   {
-      return JBossWSTestHelper.getArchiveFile(archive).toURI().toURL();
-   }
-
-   public File getResourceFile(String resource)
-   {
-      return JBossWSTestHelper.getResourceFile(resource);
-   }
-
-   public URL getResourceURL(String resource) throws MalformedURLException
-   {
-      return JBossWSTestHelper.getResourceFile(resource).toURI().toURL();
-   }
-
-   private void getArchiveArray(String archiveList)
-   {
-      if (archiveList != null)
-      {
-         StringTokenizer st = new StringTokenizer(archiveList, ", ");
-         archives = new String[st.countTokens()];
-
-         for (int i = 0; i < archives.length; i++)
-            archives[i] = st.nextToken();
-      }
-   }
-
-   protected void setUp() throws Exception
-   {
-      // verify integration target
-      String integrationTarget = JBossWSTestHelper.getIntegrationTarget();
-      log.debug("Integration target: " + integrationTarget);
-      
-      if (securityDomains != null && !securityDomains.isEmpty())
-      {
-         for (String key : securityDomains.keySet())
-         {
-            JBossWSTestHelper.addSecurityDomain(key, securityDomains.get(key));
-         }
-      }
-      if (defaultSecurityDomainRequirement)
-      {
-         String usersPropFile = System.getProperty("org.jboss.ws.testsuite.securityDomain.users.propfile");
-         String rolesPropFile = System.getProperty("org.jboss.ws.testsuite.securityDomain.roles.propfile");
-         Map<String, String> authenticationOptions = new HashMap<String, String>();
-         if (usersPropFile != null) {
-             authenticationOptions.put("usersProperties", usersPropFile);
-         }
-         if (rolesPropFile != null) {
-             authenticationOptions.put("rolesProperties", rolesPropFile);
-         }
-         authenticationOptions.put("unauthenticatedIdentity", "anonymous");
-         try {
-            JBossWSTestHelper.addSecurityDomain(JBOSSWS_SEC_DOMAIN, authenticationOptions);
-         } catch (Exception e) {
-            //be lenient here, the default jbossws security domain might be there because of
-            //a previously prematurely interrupted testsuite run, so go ahead with that, it
-            //will removed and re-installed at next test requiring it in any case
-            e.printStackTrace();
-            log.warn("Could not add default security domain!", e);
-         }
-      }
-      if (httpsConnOptions != null) {
-         JBossWSTestHelper.addHttpsConnector(httpsConnOptions);
-      }
-
-      List<URL> clientJars = new ArrayList<URL>();
-      for (int i = 0; i < archives.length; i++)
-      {
-         String archive = archives[i];
-         if (archive.endsWith("-appclient.jar"))
-         {
-            URL archiveURL = getArchiveURL(archive.substring(archive.indexOf('#') + 1));
-            clientJars.add(archiveURL);
-            JBossWSTestHelper.deployAppclient(archive, appclientOutputStream, appclientArg);
-         }
-         else if (archive.endsWith("-client.jar"))
-         {
-            URL archiveURL = getArchiveURL(archive);
-            clientJars.add(archiveURL);
-         }
-         else
-         {
-            performDeploy(archive);
-         }
-      }
-
-      ClassLoader parent = Thread.currentThread().getContextClassLoader();
-      originalClassLoader = parent;
-      // add client jars to the class loader
-      if (!clientJars.isEmpty())
-      {
-         URL[] urls = new URL[clientJars.size()];
-         for (int i = 0; i < clientJars.size(); i++)
-         {
-            urls[i] = clientJars.get(i);
-         }
-         URLClassLoader cl = new URLClassLoader(urls, parent);
-         Thread.currentThread().setContextClassLoader(cl);
-      }
-      if (httpsConnOptions != null) {
-         final long lr = lastHttpsConnectorRemoval;
-         if (lr != 0) {
-            final long wait = HTTPS_CONNECTION_REUSE_TIMEOUT - (System.currentTimeMillis() - lr);
-            if (wait > 0) {
-               log.info("Will sleep for " + wait + " ms...");
-               Thread.sleep(wait);
-               log.debug("Going on!");
-            }
-         }
-      }
-   }
-   
-   private static void performDeploy(String archive) throws Exception
-   {
-      try
-      {
-         JBossWSTestHelper.deploy(archive);
-      }
-      catch (Throwable ex)
-      {
-         ex.printStackTrace();
-         Throwable cause = ex.getCause();
-         boolean foundSecurityCause = false;
-         while (!foundSecurityCause && cause != null && cause != ex) {
-            foundSecurityCause = cause instanceof SaslException;
-            ex = cause;
-            cause = cause.getCause();
-         }
-         if (foundSecurityCause) {
-            System.out.println("\n** Please make sure you properly setup authentication credentials to the application server management console **\n\n" +
-            		"In order for running the JBossWS testsuite against a protected application server (username/password different from 'admin' / 'admin'),\n" +
-            		"use '-Djbossws.deployer.authentication.username=username -Djbossws.deployer.authentication.password=password'\n");
-         }
-         JBossWSTestHelper.undeploy(archive);
-      }
-   }
-
-   protected void tearDown() throws Exception
-   {
-      try
-      {
-         for (int i = 0; i < archives.length; i++)
-         {
-            String archive = archives[archives.length - i - 1];
-            if (archive.endsWith("-appclient.jar"))
-            {
-                JBossWSTestHelper.undeployAppclient(archive, true);
-            }
-            else if (!archive.endsWith("-client.jar"))
-            {
-                JBossWSTestHelper.undeploy(archive);
-            }
-         }
-      }
-      finally
-      {
-         Thread.currentThread().setContextClassLoader(originalClassLoader);
-         
-         if (securityDomains != null && !securityDomains.isEmpty())
-         {
-            for (String key : securityDomains.keySet())
-            {
-               JBossWSTestHelper.removeSecurityDomain(key);
-            }
-         }
-         if (defaultSecurityDomainRequirement)
-         {
-            JBossWSTestHelper.removeSecurityDomain(JBOSSWS_SEC_DOMAIN);
-         }
-         if (httpsConnOptions != null)
-         {
-            JBossWSTestHelper.removeHttpsConnector();
-            lastHttpsConnectorRemoval = System.currentTimeMillis();
-         }
-      }
-   }
-   
-   protected ClassLoader getOriginalClassLoader()
-   {
-      return originalClassLoader;
-   }
-
-   public MBeanServerConnection getServer() throws NamingException
-   {
-      return JBossWSTestHelper.getServer();
-   }
-   
-   public void addSecurityDomainRequirement(String securityDomainName, Map<String, String> authenticationOptions)
-   {
-      if (securityDomains == null) {
-         securityDomains = new HashMap<String, Map<String,String>>();
-      }
-      securityDomains.put(securityDomainName, authenticationOptions);
-   }
-   
-   public void setDefaultSecurityDomainRequirement(boolean defaultSecurityDomainRequirement)
-   {
-      this.defaultSecurityDomainRequirement = defaultSecurityDomainRequirement;
-   }
-   
-   public void setHttpsConnectorRequirement(Map<String, String> options) {
-      httpsConnOptions = options;
-   }
-}

Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyTestCaseForked.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyTestCaseForked.java	2015-02-13 15:37:58 UTC (rev 19456)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyTestCaseForked.java	2015-02-13 15:54:23 UTC (rev 19457)
@@ -54,7 +54,6 @@
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.jboss.wsf.test.JBossWSCXFTestSetup;
 import org.jboss.wsf.test.JBossWSTest;
 import org.jboss.wsf.test.JBossWSTestHelper;
 import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;

Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/enventry/EnvEntryServletTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/enventry/EnvEntryServletTestCase.java	2015-02-13 15:37:58 UTC (rev 19456)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/enventry/EnvEntryServletTestCase.java	2015-02-13 15:54:23 UTC (rev 19457)
@@ -23,24 +23,18 @@
 
 import java.io.File;
 import java.net.URL;
-import java.util.LinkedList;
-import java.util.List;
 
-import org.junit.Test;
-import org.junit.runner.RunWith;
 import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.container.test.api.RunAsClient;
 import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
-
 import org.jboss.ws.common.IOUtils;
 import org.jboss.wsf.test.JBossWSTest;
 import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
-import org.jboss.wsf.test.JBossWSTestSetup;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 /**
  * Test env entry access

Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java	2015-02-13 15:37:58 UTC (rev 19456)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java	2015-02-13 15:54:23 UTC (rev 19457)
@@ -24,7 +24,6 @@
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Iterator;
-import java.util.LinkedList;
 import java.util.List;
 
 import javax.xml.namespace.QName;
@@ -36,21 +35,17 @@
 import javax.xml.ws.handler.Handler;
 import javax.xml.ws.handler.soap.SOAPMessageContext;
 
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.runner.RunWith;
 import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.container.test.api.RunAsClient;
 import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
 import org.jboss.shrinkwrap.api.spec.JavaArchive;
 import org.jboss.ws.api.handler.GenericSOAPHandler;
 import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
-import org.jboss.wsf.test.JBossWSTestSetup;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 /**
  * [JBWS-1283] Attachment dropped on outbound messages if they have been added through a handler



More information about the jbossws-commits mailing list