JBossWS SVN: r17903 - stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2268.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-05 06:43:50 -0400 (Thu, 05 Sep 2013)
New Revision: 17903
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2268/EndpointImpl.java
Log:
Minor testsuite fix
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2268/EndpointImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2268/EndpointImpl.java 2013-09-04 11:51:25 UTC (rev 17902)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2268/EndpointImpl.java 2013-09-05 10:43:50 UTC (rev 17903)
@@ -41,8 +41,8 @@
public class EndpointImpl
{
- private StringBuilder builder = new StringBuilder();
- private File file;
+ private final StringBuffer builder = new StringBuffer();
+ private volatile File file;
public EndpointImpl()
{
@@ -65,8 +65,10 @@
@PreDestroy
protected void destroy()
{
- this.builder.append("destroy()");
- this.writeTestLog();
+ if (file != null) {
+ this.builder.append("destroy()");
+ this.writeTestLog();
+ }
}
private void writeTestLog()
11 years, 3 months
JBossWS SVN: r17902 - in stack/cxf/trunk/modules/testsuite/cxf-tests: src/test/java/org/jboss/test/ws/jaxws/cxf/bus and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-04 07:51:25 -0400 (Wed, 04 Sep 2013)
New Revision: 17902
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/META-INF/permissions.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/WEB-INF/jboss-web.xml
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/ClientEndpointBusTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientBusTestCase.java
Log:
[JBWS-3685] Changes to cxf-test testsuite for running with security manager enabled on WFLY server
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2013-09-03 14:25:49 UTC (rev 17901)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2013-09-04 11:51:25 UTC (rev 17902)
@@ -46,10 +46,32 @@
<include name="org/jboss/test/ws/jaxws/cxf/bus/Endpoint.class"/>
<include name="org/jboss/test/ws/jaxws/cxf/bus/EndpointImpl.class"/>
</classes>
+ <zipfileset
+ dir="${tests.output.dir}/test-resources/jaxws/cxf/bus/META-INF"
+ prefix="META-INF">
+ <include name="permissions.xml"/>
+ </zipfileset>
<manifest>
<attribute name="Dependencies" value="org.apache.cxf"/>
</manifest>
</war>
+
+ <!-- jaxws-cxf-bus-as7 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-bus-as7.war" webxml="${tests.output.dir}/test-resources/jaxws/cxf/bus/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/ClientEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/ClientEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/Endpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/EndpointImpl.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/cxf/bus/WEB-INF">
+ <include name="jboss-web.xml"/>
+ </webinf>
+ <manifest>
+ <attribute name="Dependencies" value="org.apache.cxf"/>
+ </manifest>
+ </war>
+
<!-- jaxws-cxf-bus-ejb3-client -->
<jar destfile="${tests.output.dir}/test-libs/jaxws-cxf-bus-ejb3-client.jar">
<fileset dir="${tests.output.dir}/test-classes">
@@ -62,12 +84,31 @@
</fileset>
<metainf dir="${tests.output.dir}/test-resources/jaxws/cxf/bus/META-INF">
<include name="wsdl/**/*" />
+ <include name="permissions.xml"/>
</metainf>
<manifest>
<attribute name="Dependencies" value="org.apache.cxf"/>
</manifest>
</jar>
+ <!-- jaxws-cxf-bus-ejb3-client-as7 -->
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-cxf-bus-ejb3-client-as7.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/Endpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/EndpointService.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/EJB3Client.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientRemoteInterface.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/BusTestException.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/cxf/bus/META-INF">
+ <include name="wsdl/**/*" />
+ </metainf>
+ <manifest>
+ <attribute name="Dependencies" value="org.apache.cxf"/>
+ </manifest>
+ </jar>
+
<!-- jaxws-cxf-bus-servlet-client -->
<war destfile="${tests.output.dir}/test-libs/jaxws-cxf-bus-servlet-client.war"
manifest="${tests.output.dir}/test-resources/jaxws/cxf/bus/META-INF/MANIFEST.MF"
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/ClientEndpointBusTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/ClientEndpointBusTestCase.java 2013-09-03 14:25:49 UTC (rev 17901)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/ClientEndpointBusTestCase.java 2013-09-04 11:51:25 UTC (rev 17902)
@@ -45,7 +45,7 @@
public static Test suite()
{
- return new JBossWSCXFTestSetup(ClientEndpointBusTestCase.class, "jaxws-cxf-bus.war");
+ return new JBossWSCXFTestSetup(ClientEndpointBusTestCase.class, isTargetJBoss7() ? "jaxws-cxf-bus-as7.war" : "jaxws-cxf-bus.war");
}
public void testClient() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientBusTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientBusTestCase.java 2013-09-03 14:25:49 UTC (rev 17901)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientBusTestCase.java 2013-09-04 11:51:25 UTC (rev 17902)
@@ -39,18 +39,19 @@
{
public static Test suite()
{
- return new JBossWSCXFTestSetup(EJB3ClientBusTestCase.class, "jaxws-cxf-bus.war");
+ return new JBossWSCXFTestSetup(EJB3ClientBusTestCase.class, isTargetJBoss7() ? "jaxws-cxf-bus-as7.war" : "jaxws-cxf-bus.war");
}
public void testSingleDeploy() throws Exception
{
- deploy("jaxws-cxf-bus-ejb3-client.jar");
+ final boolean as7 = isTargetJBoss7();
+ deploy(as7 ? "jaxws-cxf-bus-ejb3-client-as7.jar" : "jaxws-cxf-bus-ejb3-client.jar");
InitialContext iniCtx = null;
try
{
String host = getServerHost();
iniCtx = getServerInitialContext();
- Object obj = iniCtx.lookup("ejb:/jaxws-cxf-bus-ejb3-client//EJB3Client!" + EJB3ClientRemoteInterface.class.getName());
+ Object obj = iniCtx.lookup((as7 ? "ejb:/jaxws-cxf-bus-ejb3-client-as7//EJB3Client!" : "ejb:/jaxws-cxf-bus-ejb3-client//EJB3Client!") + EJB3ClientRemoteInterface.class.getName());
EJB3ClientRemoteInterface ejb3Remote = (EJB3ClientRemoteInterface)obj;
ejb3Remote.testBusCreation();
ejb3Remote.testSOAPConnection(host);
@@ -63,7 +64,7 @@
{
iniCtx.close();
}
- undeploy("jaxws-cxf-bus-ejb3-client.jar");
+ undeploy(as7 ? "jaxws-cxf-bus-ejb3-client-as7.jar" : "jaxws-cxf-bus-ejb3-client.jar");
}
}
}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/META-INF/permissions.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/META-INF/permissions.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/META-INF/permissions.xml 2013-09-04 11:51:25 UTC (rev 17902)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<permissions xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/permissions_7.xsd"
+ version="7">
+ <permission>
+ <class-name>java.lang.RuntimePermission</class-name>
+ <name>getClassLoader</name>
+ </permission>
+ <permission>
+ <class-name>java.lang.RuntimePermission</class-name>
+ <name>createClassLoader</name>
+ </permission>
+ <permission>
+ <class-name>java.lang.RuntimePermission</class-name>
+ <name>org.apache.cxf.permission</name>
+ <actions>resolveUri</actions>
+ </permission>
+ <permission>
+ <class-name>java.util.PropertyPermission</class-name>
+ <name>user.dir</name>
+ <actions>read</actions>
+ </permission>
+ <permission>
+ <class-name>java.net.SocketPermission</class-name>
+ <name>*</name>
+ <actions>connect,resolve</actions>
+ </permission>
+</permissions>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/WEB-INF/jboss-web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/WEB-INF/jboss-web.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/WEB-INF/jboss-web.xml 2013-09-04 11:51:25 UTC (rev 17902)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <context-root>/jaxws-cxf-bus</context-root>
+</jboss-web>
11 years, 3 months
JBossWS SVN: r17901 - stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsdd.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-03 10:25:49 -0400 (Tue, 03 Sep 2013)
New Revision: 17901
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsdd/WSDiscoveryTestCase.java
Log:
Allow manually setting WSDD probe/resolve timeout and extending default to 2sec
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsdd/WSDiscoveryTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsdd/WSDiscoveryTestCase.java 2013-08-30 10:11:09 UTC (rev 17900)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsdd/WSDiscoveryTestCase.java 2013-09-03 14:25:49 UTC (rev 17901)
@@ -26,6 +26,7 @@
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
import junit.framework.Test;
@@ -48,6 +49,8 @@
*/
public final class WSDiscoveryTestCase extends JBossWSTest
{
+ private static final int TIMEOUT = Integer.getInteger(WSDiscoveryTestCase.class.getName() + ".timeout", 2000);
+
public static Test suite()
{
return new JBossWSCXFTestSetup(WSDiscoveryTestCase.class, "jaxws-samples-wsdd.war,jaxws-samples-wsdd2.war");
@@ -58,17 +61,19 @@
Bus bus = null;
try {
bus = BusFactory.newInstance().createBus();
-
WSDiscoveryClient client = new WSDiscoveryClient(bus);
ProbeType pt = new ProbeType();
ScopesType scopes = new ScopesType();
pt.setScopes(scopes);
- ProbeMatchesType pmts = client.probe(pt);
+ ProbeMatchesType pmts = client.probe(pt, TIMEOUT);
assertNotNull(pmts);
assertEquals(3, pmts.getProbeMatch().size());
List<ResolveMatchType> rmts = new LinkedList<ResolveMatchType>();
for (ProbeMatchType pmt : pmts.getProbeMatch()) {
- rmts.add(client.resolve(pmt.getEndpointReference()));
+ W3CEndpointReference epr = pmt.getEndpointReference();
+ ResolveMatchType rmt = client.resolve(epr, TIMEOUT);
+ assertNotNull("Could not resolve (timeout = " + TIMEOUT + " ms) reference: " + epr, rmt);
+ rmts.add(rmt);
}
final QName typeName = new QName("http://www.jboss.org/jbossws/ws-extensions/wsdd", "ServiceIface");
@@ -91,12 +96,15 @@
ProbeType pt = new ProbeType();
ScopesType scopes = new ScopesType();
pt.setScopes(scopes);
- ProbeMatchesType pmts = client.probe(pt);
+ ProbeMatchesType pmts = client.probe(pt, TIMEOUT);
assertNotNull(pmts);
assertEquals(3, pmts.getProbeMatch().size());
List<ResolveMatchType> rmts = new LinkedList<ResolveMatchType>();
for (ProbeMatchType pmt : pmts.getProbeMatch()) {
- rmts.add(client.resolve(pmt.getEndpointReference()));
+ W3CEndpointReference epr = pmt.getEndpointReference();
+ ResolveMatchType rmt = client.resolve(epr, TIMEOUT);
+ assertNotNull("Could not resolve (timeout = " + TIMEOUT + " ms) reference: " + epr, rmt);
+ rmts.add(rmt);
}
int i = 0;
11 years, 3 months