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

stacktrace generated with cleanup = Granularity.CLASS

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.10, 8.10, 9.1
    • Fix Version/s: 7.10-HF28, 8.10-HF09, 9.2
    • Component/s: Tests
    • Backlog priority:
      500
    • Sprint:
      DevOps-16, nxSL Sprint 9.2.2
    • Story Points:
      2

      Description

      Try the following code:

      import org.junit.Test;
      import org.junit.runner.RunWith;
      import org.nuxeo.ecm.core.test.CoreFeature;
      import org.nuxeo.ecm.core.test.annotations.Granularity;
      import org.nuxeo.ecm.core.test.annotations.RepositoryConfig;
      import org.nuxeo.runtime.test.runner.Features;
      import org.nuxeo.runtime.test.runner.FeaturesRunner;
      
      @RunWith(FeaturesRunner.class)
      @Features(CoreFeature.class)
      @RepositoryConfig(cleanup = Granularity.CLASS)
      public class CleanupTest {
      	@Test
      	public void test() {
      	}
      }
      

      It will generate the following stacktrace:

      14:39:45,950 ERROR [CoreFeature] Unable to reset repository
      org.nuxeo.ecm.core.api.local.LocalException: No transaction active, cannot reconnect: test/Administrator#2
      	at org.nuxeo.ecm.core.api.local.LocalSession.getSession(LocalSession.java:102)
      	at org.nuxeo.ecm.core.api.AbstractSession.resolveReference(AbstractSession.java:335)
      	at org.nuxeo.ecm.core.api.AbstractSession.removeChildren(AbstractSession.java:1277)
      	at org.nuxeo.ecm.core.test.CoreFeature.cleanupSession(CoreFeature.java:240)
      	at org.nuxeo.ecm.core.test.CoreFeature.afterRun(CoreFeature.java:180)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$5.call(FeaturesRunner.java:187)
      	at org.nuxeo.runtime.test.runner.FeaturesLoader.apply(FeaturesLoader.java:109)
      	at org.nuxeo.runtime.test.runner.FeaturesLoader.apply(FeaturesLoader.java:96)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner.afterRun(FeaturesRunner.java:183)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$AfterClassStatement.evaluate(FeaturesRunner.java:287)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$RulesFactory$1.evaluate(FeaturesRunner.java:525)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$BeforeClassStatement.evaluate(FeaturesRunner.java:268)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
      	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h