You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Stuart McCulloch (Closed) (JIRA)" <ji...@apache.org> on 2012/02/11 15:51:59 UTC

[jira] [Closed] (FELIX-3299) Fix instable tests in BundlePluginTest

     [ https://issues.apache.org/jira/browse/FELIX-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart McCulloch closed FELIX-3299.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: maven-bundle-plugin-2.3.7
         Assignee: Stuart McCulloch

Fixed in r1243078
                
> Fix instable tests in BundlePluginTest
> --------------------------------------
>
>                 Key: FELIX-3299
>                 URL: https://issues.apache.org/jira/browse/FELIX-3299
>             Project: Felix
>          Issue Type: Task
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.6
>            Reporter: Benjamin Bentmann
>            Assignee: Stuart McCulloch
>            Priority: Minor
>             Fix For: maven-bundle-plugin-2.3.7
>
>         Attachments: FELIX-3299.patch
>
>
> Trying to build the plugin using JDK 1.5 causes the following test faillures:
> {noformat}
> -------------------------------------------------------------------------------
> Test set: org.apache.felix.bundleplugin.BundlePluginTest
> -------------------------------------------------------------------------------
> Tests run: 12, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.901 sec <<< FAILURE!
> testEmbedDependencyNegativeClauses(org.apache.felix.bundleplugin.BundlePluginTest)  Time elapsed: 0.114 sec  <<< FAILURE!
> junit.framework.ComparisonFailure: null expected:<.,[e-1.0.rar,a-1.0.war,d-1.0.zip]> but was:<.,[d-1.0.zip,a-1.0.war,e-1.0.rar]>
> 	at junit.framework.Assert.assertEquals(Assert.java:81)
> 	at junit.framework.Assert.assertEquals(Assert.java:87)
> 	at org.apache.felix.bundleplugin.BundlePluginTest.testEmbedDependencyNegativeClauses(BundlePluginTest.java:271)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at junit.framework.TestCase.runTest(TestCase.java:164)
> 	at junit.framework.TestCase.runBare(TestCase.java:130)
> 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> 	at junit.framework.TestResult.run(TestResult.java:113)
> 	at junit.framework.TestCase.run(TestCase.java:120)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:228)
> 	at junit.framework.TestSuite.run(TestSuite.java:223)
> 	at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> 	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
> 	at $Proxy0.invoke(Unknown Source)
> 	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
> 	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
> 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
> testEmbedDependencyMissingPositiveKey(org.apache.felix.bundleplugin.BundlePluginTest)  Time elapsed: 0.103 sec  <<< FAILURE!
> junit.framework.ComparisonFailure: null expected:<.,[a-1.0-one.jar,b-1.0-two].jar,a-1.0.war,b-1.0...> but was:<.,[b-1.0-two.jar,a-1.0-one].jar,a-1.0.war,b-1.0...>
> 	at junit.framework.Assert.assertEquals(Assert.java:81)
> 	at junit.framework.Assert.assertEquals(Assert.java:87)
> 	at org.apache.felix.bundleplugin.BundlePluginTest.testEmbedDependencyMissingPositiveKey(BundlePluginTest.java:329)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at junit.framework.TestCase.runTest(TestCase.java:164)
> 	at junit.framework.TestCase.runBare(TestCase.java:130)
> 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> 	at junit.framework.TestResult.run(TestResult.java:113)
> 	at junit.framework.TestCase.run(TestCase.java:120)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:228)
> 	at junit.framework.TestSuite.run(TestSuite.java:223)
> 	at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> 	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
> 	at $Proxy0.invoke(Unknown Source)
> 	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
> 	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
> 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
> testEmbedDependencyMissingNegativeKey(org.apache.felix.bundleplugin.BundlePluginTest)  Time elapsed: 0.147 sec  <<< FAILURE!
> junit.framework.ComparisonFailure: null expected:<.,[test-1.0.jar,provided-1.0.jar,runtime-1.0.jar,system]-1.0.jar> but was:<.,[provided-1.0.jar,system-1.0.jar,test-1.0.jar,runtime]-1.0.jar>
> 	at junit.framework.Assert.assertEquals(Assert.java:81)
> 	at junit.framework.Assert.assertEquals(Assert.java:87)
> 	at org.apache.felix.bundleplugin.BundlePluginTest.testEmbedDependencyMissingNegativeKey(BundlePluginTest.java:363)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at junit.framework.TestCase.runTest(TestCase.java:164)
> 	at junit.framework.TestCase.runBare(TestCase.java:130)
> 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> 	at junit.framework.TestResult.run(TestResult.java:113)
> 	at junit.framework.TestCase.run(TestCase.java:120)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:228)
> 	at junit.framework.TestSuite.run(TestSuite.java:223)
> 	at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> 	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
> 	at $Proxy0.invoke(Unknown Source)
> 	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
> 	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
> 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
> {noformat}
> The cause is the use of {{HashSet}} which produces non-deterministic element ordering.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira