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

UT always fails on windows because stream topics cannot be deleted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2021.10
    • Fix Version/s: 2021.18
    • Component/s: Tests
    • Backlog priority:
      750
    • Team:
      PLATFORM
    • Sprint:
      nxplatform #57
    • Story Points:
      3

      Description

      java.lang.AssertionError: Error while invoking stop on features: [org.nuxeo.ecm.core.test.CoreFeature, org.nuxeo.ecm.core.bulk.CoreBulkFeature, org.nuxeo.ecm.core.work.WorkManagerFeature, org.nuxeo.ecm.core.api.local.DummyLoginFeature, org.nuxeo.runtime.stream.RuntimeStreamFeature, org.nuxeo.runtime.test.runner.TransactionalFeature, org.nuxeo.runtime.cluster.ClusterFeature, org.nuxeo.runtime.test.runner.RuntimeFeature, org.nuxeo.runtime.test.runner.WithFrameworkPropertyFeature, org.nuxeo.runtime.test.runner.RandomBug$Feature, org.nuxeo.runtime.test.runner.ConditionalIgnoreRule$Feature, org.nuxeo.runtime.test.runner.MDCFeature]
      	at org.nuxeo.runtime.test.runner.FeaturesRunner.apply(FeaturesRunner.java:253)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner.apply(FeaturesRunner.java:225)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner.stop(FeaturesRunner.java:209)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner.evaluateRunnable(FeaturesRunner.java:277)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$AfterClassStatement.evaluate(FeaturesRunner.java:344)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$RulesFactory$1.evaluate(FeaturesRunner.java:515)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$BeforeClassStatement.evaluate(FeaturesRunner.java:326)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      	at org.junit.runners.Suite.runChild(Suite.java:128)
      	at org.junit.runners.Suite.runChild(Suite.java:27)
      	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
      	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      	at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:55)
      	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:137)
      	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:107)
      	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:83)
      	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
      	at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:158)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
      	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
      	Suppressed: java.lang.IllegalArgumentException: Cannot remove Chronicle Queues directory: C:\Dev\src\nuxeo-custom-field-validator\nuxeo-custom-field-validator-core\target\nxruntime-main-12862267202655505081.tmp\data\stream\bulk-status 2 exceptions: [java.io.IOException: Unable to delete file: C:\Dev\src\nuxeo-custom-field-validator\nuxeo-custom-field-validator-core\target\nxruntime-main-12862267202655505081.tmp\data\stream\bulk-status\offset-bulk-status, java.io.IOException: Unable to delete file: C:\Dev\src\nuxeo-custom-field-validator\nuxeo-custom-field-validator-core\target\nxruntime-main-12862267202655505081.tmp\data\stream\bulk-status\P-00]
      		at org.nuxeo.lib.stream.log.chronicle.ChronicleLogManager.deleteQueueBasePath(ChronicleLogManager.java:119)
      		at org.nuxeo.lib.stream.log.chronicle.ChronicleLogManager.delete(ChronicleLogManager.java:160)
      		at org.nuxeo.lib.stream.log.UnifiedLogManager.delete(UnifiedLogManager.java:127)
      		at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
      		at org.nuxeo.runtime.stream.RuntimeStreamFeature.stop(RuntimeStreamFeature.java:125)
      		at org.nuxeo.runtime.test.runner.FeaturesRunner.lambda$stop$6(FeaturesRunner.java:209)
      		at org.nuxeo.runtime.test.runner.FeaturesRunner.apply(FeaturesRunner.java:239)
      		... 28 more
      	Caused by: org.apache.commons.io.IOExceptionList: 2 exceptions: [java.io.IOException: Unable to delete file: C:\Dev\src\nuxeo-custom-field-validator\nuxeo-custom-field-validator-core\target\nxruntime-main-12862267202655505081.tmp\data\stream\bulk-status\offset-bulk-status, java.io.IOException: Unable to delete file: C:\Dev\src\nuxeo-custom-field-validator\nuxeo-custom-field-validator-core\target\nxruntime-main-12862267202655505081.tmp\data\stream\bulk-status\P-00]
      		at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:345)
      		at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1206)
      		at org.nuxeo.lib.stream.log.chronicle.ChronicleLogManager.deleteQueueBasePath(ChronicleLogManager.java:115)
      		... 34 more
      	Caused by: java.io.IOException: Unable to delete file: C:\Dev\src\nuxeo-custom-field-validator\nuxeo-custom-field-validator-core\target\nxruntime-main-12862267202655505081.tmp\data\stream\bulk-status\offset-bulk-status
      		at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1425)
      		at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:338)
      		... 36 more
      	Caused by: java.nio.file.FileSystemException: C:\Dev\src\nuxeo-custom-field-validator\nuxeo-custom-field-validator-core\target\nxruntime-main-12862267202655505081.tmp\data\stream\bulk-status\offset-bulk-status\metadata.cq4t: The process cannot access the file because it is being used by another process.
      
      		at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
      		at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
      		at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
      		at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:274)
      		at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
      		at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
      		at org.apache.commons.io.file.DeletingPathVisitor.visitFile(DeletingPathVisitor.java:142)
      		at org.apache.commons.io.file.DeletingPathVisitor.visitFile(DeletingPathVisitor.java:36)
      		at java.base/java.nio.file.Files.walkFileTree(Files.java:2725)
      		at java.base/java.nio.file.Files.walkFileTree(Files.java:2797)
      		at org.apache.commons.io.file.PathUtils.visitFileTree(PathUtils.java:687)
      		at org.apache.commons.io.file.PathUtils.deleteDirectory(PathUtils.java:328)
      		at org.apache.commons.io.file.PathUtils.delete(PathUtils.java:303)
      		at org.apache.commons.io.file.PathUtils.delete(PathUtils.java:280)
      		at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1423)
      		... 37 more
      
      [INFO] 
      [INFO] Results:
      [INFO] 
      [ERROR] Failures: 
      [ERROR]   TestCustomStringValidator.org.nuxeo.labs.sample.validator.TestCustomStringValidator Error while invoking stop on features: [org.nuxeo.ecm.core.test.CoreFeature, org.nuxeo.ecm.core.bulk.CoreBulkFeature, org.nuxeo.ecm.core.work.WorkManagerFeature, org.nuxeo.ecm.core.api.local.DummyLoginFeature, org.nuxeo.runtime.stream.RuntimeStreamFeature, org.nuxeo.runtime.test.runner.TransactionalFeature, org.nuxeo.runtime.cluster.ClusterFeature, org.nuxeo.runtime.test.runner.RuntimeFeature, org.nuxeo.runtime.test.runner.WithFrameworkPropertyFeature, org.nuxeo.runtime.test.runner.RandomBug$Feature, org.nuxeo.runtime.test.runner.ConditionalIgnoreRule$Feature, org.nuxeo.runtime.test.runner.MDCFeature]
      [INFO] 
      [ERROR] Tests run: 4, Failures: 1, Errors: 0, Skipped: 0
      
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: