[jbossws-commits] JBossWS SVN: r15512 - stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Tue Jan 24 17:14:21 EST 2012
Author: alessio.soldano at jboss.com
Date: 2012-01-24 17:14:21 -0500 (Tue, 24 Jan 2012)
New Revision: 15512
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java
Log:
Actually running test on webserviceref...
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 2012-01-24 22:13:42 UTC (rev 15511)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java 2012-01-24 22:14:21 UTC (rev 15512)
@@ -86,9 +86,27 @@
public static void testWebServiceRef(Endpoint port) throws BusTestException
{
Bus initialDefaultBus = BusFactory.getDefaultBus(false);
- Bus initialThreadBus = BusFactory.getThreadDefaultBus(false);
- checkThreadBus(initialThreadBus); //this can probably be relaxed as below
+ performInvocation(port);
checkDefaultBus(initialDefaultBus);
+ Bus threadBus = BusFactory.getThreadDefaultBus(false);
+ try
+ {
+ BusFactory.setThreadDefaultBus(null);
+ performInvocation(port);
+ Bus newThreadBus = BusFactory.getThreadDefaultBus(false);
+ 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 + " (which is also default) instead of a new bus!");
+ }
+ }
+ finally
+ {
+ BusFactory.setThreadDefaultBus(threadBus);
+ }
}
public static void testWebServiceClient(String host) throws BusTestException, Exception
More information about the jbossws-commits
mailing list