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)