com.carrotsearch.randomizedtesting.ResourceDisposalError

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Check your pattern declaration or check your assert declaration.


rafael

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Flaky unit tests
    via GitHub by samuelgruetter
    ,
    • com.carrotsearch.randomizedtesting.ResourceDisposalError: Resource in scope SUITE failed to close. Resource was registered from thread Thread[id=1742, name=coreLoadExecutor-787-thread-1, state=RUNNABLE, group=TGRP-RecoveryZkTest], registration stack trace below. at java.lang.Thread.getStackTrace(Thread.java:1479) at com.carrotsearch.randomizedtesting.RandomizedContext.closeAtEnd(RandomizedContext.java:150) at org.apache.lucene.util.LuceneTestCase.closeAfterSuite(LuceneTestCase.java:520) at org.apache.lucene.util.LuceneTestCase.wrapDirectory(LuceneTestCase.java:986) at org.apache.lucene.util.LuceneTestCase.newDirectory(LuceneTestCase.java:878) at org.apache.lucene.util.LuceneTestCase.newDirectory(LuceneTestCase.java:870) at org.apache.solr.core.MockDirectoryFactory.create(MockDirectoryFactory.java:33) at org.apache.solr.core.CachingDirectoryFactory.get(CachingDirectoryFactory.java:266) at org.apache.solr.core.CachingDirectoryFactory.get(CachingDirectoryFactory.java:222) at org.apache.solr.core.SolrCore.getNewIndexDir(SolrCore.java:244) at org.apache.solr.core.SolrCore.initIndex(SolrCore.java:458) at org.apache.solr.core.SolrCore.<init>(SolrCore.java:733) at org.apache.solr.core.SolrCore.<init>(SolrCore.java:619) at org.apache.solr.core.CoreContainer.createFromZk(CoreContainer.java:874) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:957) at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:580) at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:575) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.AssertionError: Directory not closed: MockDirWrapper(org.apache.lucene.store.RAMDirectory@38005c lockFactory=org.apache.lucene.store.NativeFSLockFactory@ff7ecd) at org.junit.Assert.fail(Assert.java:93) at org.apache.lucene.util.CloseableDirectory.close(CloseableDirectory.java:47) at com.carrotsearch.randomizedtesting.RandomizedRunner$2$1.apply(RandomizedRunner.java:602) at com.carrotsearch.randomizedtesting.RandomizedRunner$2$1.apply(RandomizedRunner.java:599) at com.carrotsearch.randomizedtesting.RandomizedContext.closeResources(RandomizedContext.java:167) at com.carrotsearch.randomizedtesting.RandomizedRunner$2.afterAlways(RandomizedRunner.java:615) at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:43) at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:358) ... 1 more

    Users with the same issue

    Andreas Häber
    8 times, last one,
    osvzs
    2 times, last one,
    Casper
    2 times, last one,
    marcbouvierdav
    1 times, last one,
    rsprangemeijer
    1 times, last one,
    94 more bugmates