aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Bosschaert <david.bosscha...@gmail.com>
Subject Re: some SPI-FLY tests not working on IBM jvm
Date Fri, 02 Nov 2012 08:44:51 GMT
Hi Emily,

I fixed this issue with the tests in r1404891. Would you like to try it again?

Best,

David

On 2 November 2012 08:09, David Bosschaert <david.bosschaert@gmail.com> wrote:
> Hi Emily,
>
> I wrote those tests and looked at them again, but to me it seems that
> the order cannot actually be significant. The testclient that produces
> this string is as follows:
>   ServiceLoader<MySPI> loader = ServiceLoader.load(MySPI.class);
>   for (MySPI mySPI : loader) {
>     sb.append(mySPI.someMethod(input));
>   }
> and this means that any order of the SPIs should be allowable.
>
> I'll have a look to make the tests a little more flexible and will let
> you know when I'm done.
>
> Best regards,
>
> David
>
> On 1 November 2012 23:16, Emily Jiang <emijiang6@googlemail.com> wrote:
>> Recently the following tests are failing on ibm jvm:
>>
>>
>> org.apache.aries.spifly.dynamic.ClientWeavingHookGenericCapabilityTest
>>
>> testMultipleProviders:
>> org.junit.ComparisonFailure: All three services should be invoked in the
>> correct order expected:<[ollehHELLO5]> but was:<[HELLO5olleh]>
>>     at org.junit.Assert.assertEquals(Assert.java:123)
>>     at
>> org.apache.aries.spifly.dynamic.ClientWeavingHookGenericCapabilityTest.testMultipleProviders(ClientWeavingHookGenericCapabilityTest.java:258)
>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>     at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
>>     at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>>     at java.lang.reflect.Method.invoke(Method.java:611)
>>     at
>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>>     at
>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>>     at
>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>>     at
>> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>>     at
>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>>     at
>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>>     at
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
>>     at
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>>     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
>>     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
>>     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
>>     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
>>     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
>>     at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>>     at
>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>>     at
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
>>     at
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
>>     at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>     at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
>>     at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>>     at java.lang.reflect.Method.invoke(Method.java:611)
>>     at
>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>>     at
>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
>> testServiceFilteringAlternative
>>
>> org.junit.ComparisonFailure: All providers should be selected for this one
>> expected:<[ollehHELLO5impl4]> but was:<[HELLO5impl4olleh]>
>>     at org.junit.Assert.assertEquals(Assert.java:123)
>>     at
>> org.apache.aries.spifly.dynamic.ClientWeavingHookGenericCapabilityTest.testServiceFilteringAlternative(ClientWeavingHookGenericCapabilityTest.java:438)
>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>     at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
>>     at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>>     at java.lang.reflect.Method.invoke(Method.java:611)
>>     at
>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>>     at
>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>>     at
>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>>     at
>> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>>     at
>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>>     at
>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>>     at
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
>>     at
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>>     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
>>     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
>>     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
>>     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
>>     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
>>     at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>>     at
>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>>     at
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
>>     at
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
>>     at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>     at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
>>     at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>>     at java.lang.reflect.Method.invoke(Method.java:611)
>>     at
>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>>     at
>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
>>
>>
>> I got five other errors on
>> org.apache.aries.spifly.dynamic.ClientWeavingHookTest
>> testMultipleProviders: org.junit.ComparisonFailure: All three services
>> should be invoked in the correct order expected:<[ollehHELLO5]> but
>> was:<[HELLO5olleh]>
>> testClientMultipleTargetBundles2: org.junit.ComparisonFailure: All
>> providers should be selected for this one expected:<[ollehimpl4]> but
>> was:<[impl4olleh]>
>> testClientMultipleTargetBundles2: org.junit.ComparisonFailure: All
>> providers should be selected for this one expected:<[ollehimpl4]> but
>> was:<[impl4olleh]>
>> testClientSpecificProviderLoadArgument: org.junit.ComparisonFailure: All
>> providers should be selected for this one expected:<[ollehHELLO5impl4]> but
>> was:<[HELLO5impl4olleh]>
>>
>> It looks like the invocation order is not expected. Any suggestions?
>> --
>> Thanks
>> Emily
>> =================
>> Emily Jiang
>> ejiang@apache.org

Mime
View raw message