You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Daniel Kulp <dk...@apache.org> on 2010/09/03 21:37:58 UTC

Re: Test failure in org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest

The ServerPersistenceTest seems to randomly fail and I really haven't been 
able to figure it out yet.  I cannot reproduce when running in the eclipse 
debugger so it won't be a fun thing to debug.  Might be best  to just disable 
it.  :-(    I think the  SequenceTest also fails periodically, but at a MUCH 
lower rate than ServerPersistenceTest.

The JAXRSLoggingAtomPushSpringTest actually turned out to be an issue between 
startup ordering and the garbage collector.   The Logging stuff was 
configuring the loggers with the handler needed to handle the recording, but 
those loggers were then garbage collected prior to the static initializers 
being run in the classes  that actually did the logging.   When the static 
initializers were run, they would get a new logger that wasn't configured.   
Re-doing the spring config to make sure the implementation classes were 
configured first (so their static initializers were run first) fixed it.


Dan



On Monday 30 August 2010 5:03:04 am Jim Talbut wrote:
> Right, back on the case.
> 
> I started with an "svn up" and then "mvn clean install".
> So far I've done five complete builds, three with no error and two with
> errors.
> 
> The most recent one only failed on this:
> Running org.apache.cxf.systest.ws.rm.ServerPersistenceTest
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 12.701
> sec <<< FAILURE!
> testRecovery(org.apache.cxf.systest.ws.rm.ServerPersistenceTest)  Time
> elapsed: 9.219 sec <<< FAILURE!
> java.lang.AssertionError: Unexpected number of responses already
> received. expected:<2> but was:<1>
>          at org.junit.Assert.fail(Assert.java:91)
>          at org.junit.Assert.failNotEquals(Assert.java:645)
>          at org.junit.Assert.assertEquals(Assert.java:126)
>          at org.junit.Assert.assertEquals(Assert.java:470)
>          at
> org.apache.cxf.systest.ws.rm.ServerPersistenceTest.verifyMissingResponse(Se
> rverPersistenceTest.java:174) at
> org.apache.cxf.systest.ws.rm.ServerPersistenceTest.testRecovery(ServerPersi
> stenceTest.java:143)
> 
> Given the random nature I think there is some kind of timing issue going
> on somewhere.
> 
> Jim
> 
> On 17/08/2010 07:29, Sergey Beryozkin wrote:
> > May be we will figure out the cause in the next 2 weeks :-)
> > 
> > Have a good break Jim :-)
> > 
> > cheers, Sergey
> > 
> > On Tue, Aug 17, 2010 at 7:26 AM, Jim Talbut<jt...@spudsoft.co.uk>  
wrote:
> >> SErgey,
> >> 
> >> Thanks for that.
> >> I will test it, but in 95 minutes I'm setting off on holiday for two
> >> weeks, so there will be a delay :).
> >> 
> >> Jim
> >> 
> >> ----- Original Message ----- From: "Sergey Beryozkin"<
> >> sberyozkin@gmail.com>
> >> To:<us...@cxf.apache.org>
> >> Sent: Tuesday, August 17, 2010 7:23 AM
> >> Subject: Re: Test failure in
> >> org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest
> >> 
> >>   Actually, I'm looking at this beans.xml, and I suspect on Windows
> >>> 
> >>> <property name="url" value="http://localhost:
> >>> ${testutil.ports.AbstractSpringServer}/entriesMany/entries"/>
> >>> 
> >>> is not filtered properly...
> >>> 
> >>> Jim, if could temporarily introduce some fixed port and see if it fixes
> >>> the
> >>> issue then it would help to isolate the problem
> >>> 
> >>> cheers, Sergey
> >>> 
> >>> On Tue, Aug 17, 2010 at 7:00 AM, Sergey Beryozkin<sberyozkin@gmail.com
> >>> 
> >>>> wrote:
> >>>   I haven't been using Windows recently so not sure what is the cause
> >>>> 
> >>>> either.
> >>>> 
> >>>> But yes, most likely reason is some changes either in CXF or in the
> >>>> test setup which might've happened
> >>>> recently and which affect the way this test runs on Windows. It should
> >>>> really work.
> >>>> I'd need to rebuild on Windows and investigate;
> >>>> Jim, if you could afford spending a bit of time on this issue
> >>>> and see what might be happening then it would help - disable all the
> >>>> tests
> >>>> but a single one, this file,
> >>>> 
> >>>> 
> >>>> 
> >>>> http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/reso
> >>>> urces/jaxrs_logging_atompush/WEB-INF/beans.xml .
> >>>> 
> >>>> is where AtomPushBeans are configured too.
> >>>> 
> >>>> cheers, Sergey
> >>>> 
> >>>> On Mon, Aug 16, 2010 at 8:22 PM, Daniel Kulp<dk...@apache.org>  wrote:
> >>>>> I have NO idea.   The JAXRSLoggingAtom**Test classes setup logging
> >>>>> with separate logging properties file.  It might be the case that
> >>>>> it's not finding
> >>>>> the correct file or something.   Not really sure.
> >>>>> 
> >>>>> 
> >>>>> 
> >>>>> systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/resources/*
> >>>>> .properties
> >>>>> 
> >>>>> You could try also doing something like getting the logger for the
> >>>>> org.apache.cxf.systest.jaxrs category and checking if the warning
> >>>>> level or
> >>>>> similar it turned on.   If not, it's definitely setup wrong.
> >>>>> 
> >>>>> 
> >>>>> Dan
> >>>>> 
> >>>>> On Friday 13 August 2010 10:30:43 am Jim Talbut wrote:
> >>>>>> 64 bit Vista, JDK 1.6.
> >>>>>> 
> >>>>>> Building from trunk, I'm hitting these errors:
> >>>>>> 
> >>>>>> Running org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest
> >>>>>> Starting Server
> >>>>>> Tests run: 5, Failures: 5, Errors: 0, Skipped: 0, Time elapsed:
> >>>>>> 18.099 sec<<<  FAILURE!
> >>>>> 
> >>>>> testFeedsWithLogRecordsOneEntry(org.apache.cxf.systest.jaxrs.JAXRSLog
> >>>>> gingAt
> >>>>> 
> >>>>>> omPushSpringTest) Time elapsed: 3.222 sec<<<  FAILURE!
> >>>>>> java.lang.AssertionError: expected:<8>  but was:<0>
> >>>>>> 
> >>>>>>           at org.junit.Assert.fail(Assert.java:91)
> >>>>>>           at org.junit.Assert.failNotEquals(Assert.java:645)
> >>>>>>           at org.junit.Assert.assertEquals(Assert.java:126)
> >>>>>>           at org.junit.Assert.assertEquals(Assert.java:470)
> >>>>>>           at org.junit.Assert.assertEquals(Assert.java:454)
> >>>>>>           at
> >>>>> 
> >>>>> org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest.testFeeds
> >>>>> WithLo
> >>>>> 
> >>>>>> gRecordsOneEntry(JAXRSLoggingAtomPushSpringTest.java:88)
> >>>>> 
> >>>>> testFeedsWithBatchLogRecordsOneEntry(org.apache.cxf.systest.jaxrs.JAX
> >>>>> RSLogg
> >>>>> 
> >>>>>> ingAtomPushSpringTest) Time elapsed: 3.014 sec<<<  FAILURE!
> >>>>>> java.lang.AssertionError: expected:<2>  but was:<0>
> >>>>>> 
> >>>>>>           at org.junit.Assert.fail(Assert.java:91)
> >>>>>>           at org.junit.Assert.failNotEquals(Assert.java:645)
> >>>>>>           at org.junit.Assert.assertEquals(Assert.java:126)
> >>>>>>           at org.junit.Assert.assertEquals(Assert.java:470)
> >>>>>>           at org.junit.Assert.assertEquals(Assert.java:454)
> >>>>>>           at
> >>>>> 
> >>>>> org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest.testFeeds
> >>>>> WithBa
> >>>>> 
> >>>>>> tchLogRecordsOneEntry(JAXRSLoggingAtomPushSpringTest.java:111)
> >>>>> 
> >>>>> testEntriesWithLogRecordsOneEntry(org.apache.cxf.systest.jaxrs.JAXRSL
> >>>>> ogging
> >>>>> 
> >>>>>> AtomPushSpringTest) Time elapsed: 3.017 sec<<<  FAILURE!
> >>>>>> java.lang.AssertionError: expected:<8>  but was:<0>
> >>>>>> 
> >>>>>>           at org.junit.Assert.fail(Assert.java:91)
> >>>>>>           at org.junit.Assert.failNotEquals(Assert.java:645)
> >>>>>>           at org.junit.Assert.assertEquals(Assert.java:126)
> >>>>>>           at org.junit.Assert.assertEquals(Assert.java:470)
> >>>>>>           at org.junit.Assert.assertEquals(Assert.java:454)
> >>>>>>           at
> >>>>> 
> >>>>> org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest.testEntri
> >>>>> esWith
> >>>>> 
> >>>>>> LogRecordsOneEntry(JAXRSLoggingAtomPushSpringTest.java:133)
> >>>>> 
> >>>>> testManyEntries(org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpri
> >>>>> ngTest
> >>>>> 
> >>>>>> ) Time elapsed: 3.013 sec<<<  FAILURE!
> >>>>>> java.lang.AssertionError: expected:<4>  but was:<0>
> >>>>>> 
> >>>>>>           at org.junit.Assert.fail(Assert.java:91)
> >>>>>>           at org.junit.Assert.failNotEquals(Assert.java:645)
> >>>>>>           at org.junit.Assert.assertEquals(Assert.java:126)
> >>>>>>           at org.junit.Assert.assertEquals(Assert.java:470)
> >>>>>>           at org.junit.Assert.assertEquals(Assert.java:454)
> >>>>>>           at
> >>>>> 
> >>>>> org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest.testManyE
> >>>>> ntries
> >>>>> 
> >>>>>> (JAXRSLoggingAtomPushSpringTest.java:151)
> >>>>> 
> >>>>> testFeedsWithLogRecordsExtension(org.apache.cxf.systest.jaxrs.JAXRSLo
> >>>>> ggingA
> >>>>> 
> >>>>>> tomPushSpringTest) Time elapsed: 3.014 sec<<<  FAILURE!
> >>>>>> java.lang.AssertionError: expected:<8>  but was:<0>
> >>>>>> 
> >>>>>>           at org.junit.Assert.fail(Assert.java:91)
> >>>>>>           at org.junit.Assert.failNotEquals(Assert.java:645)
> >>>>>>           at org.junit.Assert.assertEquals(Assert.java:126)
> >>>>>>           at org.junit.Assert.assertEquals(Assert.java:470)
> >>>>>>           at org.junit.Assert.assertEquals(Assert.java:454)
> >>>>>>           at
> >>>>> 
> >>>>> org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest.testFeeds
> >>>>> WithLo
> >>>>> 
> >>>>>> gRecordsExtension(JAXRSLoggingAtomPushSpringTest.java:174)
> >>>>>> 
> >>>>>> I've tried building on an Ubuntu virtual machine and it worked
> >>>>>> without issue.
> >>>>>> 
> >>>>>> Any thoughts?
> >>>>>> 
> >>>>>> Jim
> >>>>> 
> >>>>> --
> >>>>> Daniel Kulp
> >>>>> dkulp@apache.org
> >>>>> http://dankulp.com/blog

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog