On Monday, July 18, 2011 4:21:28 PM Jason Whaley wrote:
> Additionally, the source code of what I'm working on is publicly available
> at https://test.kuali.org/svn/rice/trunk .  Specifically the module that
> exhibits this behavior is https://test.kuali.org/svn/rice/trunk/it/core/ .
> 
> The tests using Endpoint.publish are
>       org.kuali.rice.core.impl.parameter.ParameterRepositoryServiceRemoteTest
> and org.kuali.rice.core.impl.style.StyleRepositoryServiceRemoteTest .  The
> test class inheriting the hierarchy of test harness classes is
> org.kuali.rice.core.impl.criteria.CriteriaLookupServiceOjbImplIntTest .

Could you try NOT calling the shutdowns in the @After and seeing if that 
changes the behavior?    

With keepalives turned on, there is a bug or issue in Jetty or the JDK or 
something where, at shutdown, if there are keepalives still outstanding, it 
doesn't completely release the port.   When the next service starts up on that 
same port, it kind of gets into a strange state.

Dan


> 
> Thanks,
> --Whaley
> 
> On Jul 18, 2011, at 4:16 PM, Jason Whaley wrote:
> > In a specific integration test module of a project I'm working on, we
> > have only three test classes - one test that subclasses a hierarchy of
> > TestCase classes that are responsible for setting up a test harness to
> > run full end to end tests of our app.
> > 
> > The other two tests basically take a JAX-WS annotated interface and its
> > implementation, exposes the service with Endpoint.publish, and returns
> > a proxy to that service for the test to actually use to verify things
> > work when done over SOAP.  Here's the method used to actually publish
> > that service and return the proxy:
> > 
> > https://gist.github.com/1090795
> > 
> > When I run the two tests that call Endpoint.publish by themselves, all
> > works as expected.  If I run all three tests together with the first
> > class that inherits the hierarchy of classes to setup the harness, then
> > each of the test methods in the latter two tests, once run always fail
> > with a stack trace that contains the following in the exception chain:
> > 
> > Caused by: java.net.ConnectException: ConnectException invoking
> > http://localhost:1031/service: Connection refused
> > 
> >     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> >     Method)
> >     at
> >     sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
> >     orAccessorImpl.java:39) at
> >     sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
> >     onstructorAccessorImpl.java:27) at
> >     java.lang.reflect.Constructor.newInstance(Constructor.java:513) at
> >     org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapExce
> >     ption(HTTPConduit.java:2128) at
> >     org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(H
> >     TTPConduit.java:2113)
> > 
> > This is happening on the client side.  I attached a debugger to the test
> > invocation and noticed that Endpoint.publish is actually being called
> > and returning successful, but immediately after the method returns
> > there is nothing listening on the port specified in the URL string
> > passed to Endpoint.publish.    There is nothing logged nor anything
> > that I could see within the internal CXF code I stepped through that
> > indicated the service publishing actually failed, but the service is
> > never exposed.
> > 
> > What I'd like to know is:
> > 
> > 1) is this the expected behavior of Endpoint.publish that implementers
> > are supposed to provided?  It appears the API for Endpoint.publish says
> > it only throws a SecurityException when the Securitymanager is setup to
> > not allow publishing but nothing else.
> > 
> > 2) What could be the possible cause of this?  Is there anything specific
> > I should be hunting down during the @Setup and running of the other
> > test methods?  As far as I can tell that test method is cleaning up its
> > resources.
> > 
> > Any help is very much appreciated.
-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to