Author: asoldano
Date: 2014-08-25 11:49:04 -0400 (Mon, 25 Aug 2014)
New Revision: 18868
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/DeploymentArchives.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EndpointService.java
Log:
[JBWS-3822] Fix few regressions
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java 2014-08-25
15:47:13 UTC (rev 18867)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java 2014-08-25
15:49:04 UTC (rev 18868)
@@ -37,6 +37,9 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
+import org.jboss.wsf.stack.cxf.client.ClientBusSelector;
+import org.jboss.wsf.stack.cxf.client.Constants;
+
/**
*
* @author alessio.soldano(a)jboss.com
@@ -121,14 +124,20 @@
BusFactory.setThreadDefaultBus(null);
performInvocation(url); //goes through ServiceDelegate which sets the thread bus
if it's null
Bus newThreadBus = BusFactory.getThreadDefaultBus(false);
- if (newThreadBus == initialDefaultBus)
- {
- throw new BusTestException("Thread bus set to former default bus "
+ initialDefaultBus + " instead of a new bus!");
+ if
(ClientBusSelector.getDefaultStrategy().equals(Constants.THREAD_BUS_STRATEGY)) {
+ if (newThreadBus == initialDefaultBus)
+ {
+ throw new BusTestException("Thread bus set to former default bus
" + initialDefaultBus + " instead of a new bus!");
+ }
+ else if (newThreadBus == threadBus)
+ {
+ throw new BusTestException("Thread bus set to former thread bus
" + threadBus + " instead of a new bus!");
+ }
+ } else {
+ if (newThreadBus != null) {
+ throw new BusTestException("Thread bus set to " + newThreadBus +
" instead of null!");
+ }
}
- else if (newThreadBus == threadBus)
- {
- throw new BusTestException("Thread bus set to former thread bus " +
threadBus + " instead of a new bus!");
- }
performInvocation(url);
checkThreadBus(newThreadBus); //the thread bus is not changed as it's not
null
checkDefaultBus(initialDefaultBus);
@@ -187,6 +196,11 @@
protected static void checkThreadBus(Bus expectedThreadBus) throws BusTestException
{
Bus bus = BusFactory.getThreadDefaultBus(false);
+ if (expectedThreadBus == null && bus != null)
+ {
+ throw new BusTestException("Thread " + Thread.currentThread() + "
associated with bus " + bus
+ + " instead of expected null bus");
+ }
if (bus != expectedThreadBus)
{
throw new BusTestException("Thread " + Thread.currentThread() + "
associated with bus " + bus
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/DeploymentArchives.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/DeploymentArchives.java 2014-08-25
15:47:13 UTC (rev 18867)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/DeploymentArchives.java 2014-08-25
15:49:04 UTC (rev 18868)
@@ -67,7 +67,7 @@
public static final String EJB3_CLIENT = JBossWSTestHelper.writeToFile(new
JBossWSTestHelper.JarDeployment("jaxws-cxf-bus-ejb3-client.jar") { {
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.apache.cxf\n"))
+ + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
.addClass(org.jboss.test.ws.jaxws.cxf.bus.AbstractClient.class)
.addClass(org.jboss.test.ws.jaxws.cxf.bus.BusTestException.class)
.addClass(org.jboss.test.ws.jaxws.cxf.bus.EJB3Client.class)
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EndpointService.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EndpointService.java 2014-08-25
15:47:13 UTC (rev 18867)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EndpointService.java 2014-08-25
15:49:04 UTC (rev 18868)
@@ -53,6 +53,10 @@
super(wsdlLocation, serviceName);
}
+ public EndpointService(URL wsdlLocation, QName serviceName, WebServiceFeature...
features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
public EndpointService() {
super(WSDL_LOCATION, TESTENDPOINTSERVICE);
}
Show replies by date