cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glynn, Eoghan" <eoghan.gl...@iona.com>
Subject RE: Small problem with testutil-common post move to Junit4
Date Fri, 16 Mar 2007 14:01:54 GMT

Thanks Gary, I've just committed this ...

/Eoghan 

> -----Original Message-----
> From: Tully, Gary [mailto:Gary.Tully@iona.com] 
> Sent: 16 March 2007 12:36
> To: cxf-dev@incubator.apache.org
> Subject: Small problem with testutil-common post move to Junit4
> 
> 
> Hi,
> I have found a small problem with the default initialization 
> of the member variable 'bus', in 
> AbstractBusClientServerTestBase. The result is that an @After 
> annotated method shuts down 'bus' if it is not null. This 
> means that if a @BeforeClass initialises the staticBus, after 
> the first test run, it will be shutdown leaving nothing for 
> the @AfterClass method and ensuring that a new default bus is 
> created by the runtime for subsequent tests, which is 
> contrary to the use of a static bus. The staticBus can be 
> resolved via BusFactory because it is set as the defaultBus, 
> so there does not seem to be a need for the default 
> initialisation of 'bus'.
> 
> The fix below sorts out the problem. All tests pass with this change.
> 
> Can someone commit the for me?
> 
> Thanks,
> Gary.
> 
> 
> svn diff
> testutils\src\main\java\org\apache\cxf\testutil\common\Abstrac
> tBusClient
> ServerTestBase.java
> Index:
> testutils/src/main/java/org/apache/cxf/testutil/common/Abstrac
> tBusClient
> ServerTestBase.java
> ===================================================================
> ---
> testutils/src/main/java/org/apache/cxf/testutil/common/Abstrac
> tBusClient
> ServerTestBase.java (revision 518934)
> +++
> testutils/src/main/java/org/apache/cxf/testutil/common/Abstrac
> tBusClient
> ServerTestBase.java (working copy)
> @@ -44,7 +44,7 @@
>      protected static Bus staticBus;
> 
>      protected String configFileName = defaultConfigFileName;
> -    protected Bus bus = staticBus;
> +    protected Bus bus;
> 
>      public void createBus(String config) throws Exception {
>          configFileName = config;
> 

Mime
View raw message