Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-16984

Fix FeaturesRunner initialization for test suites

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.0-HF10
    • Fix Version/s: 6.0-HF11
    • Component/s: Tests

      Description

      With a test suite declaring many times the same RuntimeFeature, we end up with the following stacktrace:

      14:40:57 14:35:52,486 ERROR [RepositorySettings] java.lang.NullPointerException
      14:40:57 java.lang.NullPointerException
      14:40:57 	at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.deploy(DefaultRuntimeContext.java:119)
      14:40:57 	at org.nuxeo.ecm.core.test.RepositorySettings.initialize(RepositorySettings.java:203)
      14:40:57 	at org.nuxeo.ecm.core.test.CoreFeature.start(CoreFeature.java:84)
      14:40:57 	at org.nuxeo.runtime.test.runner.FeaturesRunner$6.call(FeaturesRunner.java:270)
      14:40:57 	at org.nuxeo.runtime.test.runner.FeaturesRunner.invokeFeatures(FeaturesRunner.java:476)
      14:40:57 	at org.nuxeo.runtime.test.runner.FeaturesRunner.start(FeaturesRunner.java:266)
      14:40:57 	at org.nuxeo.runtime.test.runner.FeaturesRunner.run(FeaturesRunner.java:362)
      14:40:57 	at com.nuxeo.studio.test.MultiStudioRunner.runChild(MultiStudioRunner.java:174)
      14:40:57 	at com.nuxeo.studio.test.MultiStudioRunner.runChild(MultiStudioRunner.java:55)
      14:40:57 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      14:40:57 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      14:40:57 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      14:40:57 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      14:40:57 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      14:40:57 	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      14:40:57 	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
      14:40:57 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
      14:40:57 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
      14:40:57 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
      14:40:57 	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
      14:40:57 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
      14:40:57 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
      

      This is because the FeaturesRunner does not clear its previous feature at each iteration and ends up initializing different Runtime.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: