cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Coloc Binding Test Error
Date Thu, 07 Jun 2007 14:20:06 GMT
On Thursday 07 June 2007 07:52, Paibir, Ajay wrote:
> Hi Polar,
>
> I have not been able to reproduce this error on my windows box even on
> repeated runs. Further this unit test itself doesn't have multiple
> threads(unless easymock does something in its runtime) to get a
> ConcurrentModification ex.

Just FYI:  you don't need threads to get a 
ConcurrentModificationException with the collections.   Something simple 
like:

List<String> lst = new ArrayList<String>();
lst.add("1");
Iterator<String> it = lst.iterator();
lst.add("2");
String s = it.next();

will result in the ConcurrentModificationException.

Dan



> Let me see if changing the unit test in any way based on the EasyMock
> code helps.
>
> Ajay
>
> > -----Original Message-----
> > From: Polar Humenn [mailto:phumenn@iona.com]
> > Sent: 07 June 2007 05:10
> > To: cxf-dev@incubator.apache.org
> > Subject: Coloc Binding Test Error
> >
> > I get the following error intermittently, probably based on
> > system load.
> > It's a concurrent modification error on some List. Looks like
> > it has to do with Easymock, some misconception about lists, I think.
> > But in anycase, we should probably avoid this.
> >
> > Cheers,
> > -Polar
> > -------------------------------------------------------
> > Running org.apache.cxf.binding.coloc.ColocMessageObserverTest
> > Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time
> > elapsed: 0.875 sec Running
> > org.apache.cxf.binding.coloc.ColocUtilTest Tests run: 6, Failures:
> > 0, Errors: 0, Skipped: 0, Time
> > elapsed: 0.059 sec Running
> > org.apache.cxf.binding.coloc.ColocOutInterceptorTest
> > Tests run: 8, Failures: 0, Errors: 1, Skipped: 0, Time
> > elapsed: 0.248 sec <<< FAILURE!
> > testColocOutIsColocated(org.apache.cxf.binding.coloc.ColocOutI
> > nterceptorTest)
> > Time elapsed: 0.019 sec  <<< ERROR!
> > java.util.ConcurrentModificationException
> >         at
> > java.util.AbstractList$Itr.checkForComodification(AbstractList
> > .java:449)
> >         at java.util.AbstractList$Itr.next(AbstractList.java:420)
> >         at
> > org.easymock.internal.UnorderedBehavior.addExpected(UnorderedB
> > ehavior.java:22)
> >         at
> > org.easymock.internal.MocksBehavior.addExpected(MocksBehavior.java:4
> >1) at
> > org.easymock.internal.RecordState.times(RecordState.java:185)
> >         at
> > org.easymock.internal.RecordState.closeMethod(RecordState.java:229)
> >         at
> > org.easymock.internal.RecordState.invoke(RecordState.java:62)
> >         at
> > org.easymock.internal.MockInvocationHandler.invoke(MockInvocat
> > ionHandler.java:24)
> >         at
> > org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethods
> > Filter.java:45)
> >         at
> > org.easymock.classextension.internal.ClassProxyFactory$1.inter
> > cept(ClassProxyFactory.java:69)
> >         at
> > org.apache.cxf.service.model.BindingInfo$$EnhancerByCGLIB$$be3
> > 758c2.getOperation(<generated>)
> >         at
> > org.apache.cxf.binding.coloc.ColocOutInterceptorTest.verifyIsC
> > olocatedWithDifferentOperation(ColocOutInterceptorTest.java:366)
> >         at
> > org.apache.cxf.binding.coloc.ColocOutInterceptorTest.testColoc
> > OutIsColocated(ColocOutInterceptorTest.java:149)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method) at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> > orImpl.java:39)
> >         at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> > odAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:585)
> >         at
> > org.junit.internal.runners.TestMethodRunner.executeMethodBody(
> > TestMethodRunner.java:99)
> >         at
> > org.junit.internal.runners.TestMethodRunner.runUnprotected(Tes
> > tMethodRunner.java:81)
> >         at
> > org.junit.internal.runners.BeforeAndAfterRunner.runProtected(B
> > eforeAndAfterRunner.java:34)
> >         at
> > org.junit.internal.runners.TestMethodRunner.runMethod(TestMeth
> > odRunner.java:75)
> >         at
> > org.junit.internal.runners.TestMethodRunner.run(TestMethodRunn
> > er.java:45)
> >         at
> > org.junit.internal.runners.TestClassMethodsRunner.invokeTestMe
> > thod(TestClassMethodsRunner.java:66)
> >         at
> > org.junit.internal.runners.TestClassMethodsRunner.run(TestClas
> > sMethodsRunner.java:35)
> >         at
> > org.junit.internal.runners.TestClassRunner$1.runUnprotected(Te
> > stClassRunner.java:42)
> >         at
> > org.junit.internal.runners.BeforeAndAfterRunner.runProtected(B
> > eforeAndAfterRunner.java:34)
> >         at
> > org.junit.internal.runners.TestClassRunner.run(TestClassRunner
> > .java:52)
> >         at
> > org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4T
> > estSet.java:62)
> >         at
> > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.exe
> > cuteTestSet(AbstractDirectoryTestSuite.java:138)
> >         at
> > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.exe
> > cute(AbstractDirectoryTestSuite.java:125)
> >         at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method) at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> > orImpl.java:39)
> >         at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> > odAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:585)
> >         at
> > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInPro
> > cess(SurefireBooter.java:290)
> >         at
> > org.apache.maven.surefire.booter.SurefireBooter.main(SurefireB
> > ooter.java:818)
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
> Ireland

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Mime
View raw message