Uploaded image for project: 'Apache NiFi MiNiFi - MOVED TO NIFI PROJECT'
  1. Apache NiFi MiNiFi - MOVED TO NIFI PROJECT
  2. MINIFI-409

testMergeJournalsEmptyJournal test failing on Windows 10

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.2.0
    • 0.3.0
    • Testing
    • None

    Description

      The MiNiFiPersistentProvenanceRepositoryTest.testMergeJournalsEmptyJournal() test is reliably failing on Windows 10. The failure message is identical to the message contained in NIFI-3440. It appears the solution to NIFI-3440 was to skip this test for Windows builds.

      -------------------------------------------------------
      T E S T S
      -------------------------------------------------------
      Running org.apache.nifi.provenance.MiNiFiPersistentProvenanceRepositoryTest
      Tests run: 15, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 32.653 sec <<< FAILURE! - in org.apache.nifi.provenance.MiNiFiPersistentProvenanceRepositoryTest
      testMergeJournalsEmptyJournal(org.apache.nifi.provenance.MiNiFiPersistentProvenanceRepositoryTest) Time elapsed: 0.647 sec <<< FAILURE!
      java.lang.AssertionError: mergeJournals() should not error on empty journal expected:<0> but was:<16>
      at org.junit.Assert.fail(Assert.java:88)
      at org.junit.Assert.failNotEquals(Assert.java:834)
      at org.junit.Assert.assertEquals(Assert.java:645)
      at org.apache.nifi.provenance.MiNiFiPersistentProvenanceRepositoryTest.testMergeJournalsEmptyJournal(MiNiFiPersistentProvenanceRepositoryTest.java:691)

      Results :

      Failed tests:
      MiNiFiPersistentProvenanceRepositoryTest.testMergeJournalsEmptyJournal:691 mergeJournals() should not error on empty journal expected:<0> but was:<16>

      More details:

      headerSize =4696
      recordSize =208
      recordSize2=208
      13:59:52.836 [main] INFO org.apache.nifi.provenance.PersistentProvenanceRepository - Recovered 0 records
      13:59:52.846 [main] INFO org.apache.nifi.provenance.PersistentProvenanceRepository - Created new Provenance Event Writers for events starting with ID 0
      13:59:52.877 [main] DEBUG org.apache.nifi.provenance.PersistentProvenanceRepository - Merging [target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.0, target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.1, target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.10, target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.11, target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.12, target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.13, target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.14, target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.15, target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.2, target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.3, target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.4, target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.5, target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.6, target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.7, target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.8, target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.9] to target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\0.prov
      13:59:53.096 [main] DEBUG org.apache.nifi.provenance.toc.StandardTocWriter - Adding block 0 at offset 0
      13:59:53.471 [main] DEBUG org.apache.nifi.provenance.lucene.SimpleIndexManager - Providing new index writer for target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\index-1509127193096
      13:59:53.486 [main] DEBUG org.apache.nifi.provenance.lucene.SimpleIndexManager - Decrementing count for Index Writer for target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\index-1509127193096 to 0; closing writer
      13:59:53.533 [main] INFO org.apache.nifi.provenance.lucene.SimpleIndexManager - Index Writer for target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\index-1509127193096 has been returned to Index Manager and is no longer in use. Closing Index Writer
      13:59:53.533 [main] DEBUG org.apache.nifi.provenance.lucene.SimpleIndexManager - Closing Index Writer for target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\index-1509127193096...
      13:59:53.533 [main] DEBUG org.apache.nifi.provenance.lucene.SimpleIndexManager - Finished closing Index Writer for target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\index-1509127193096...
      13:59:53.549 [main] WARN org.apache.nifi.provenance.PersistentProvenanceRepository - Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.0; this file should be cleaned up manually
      WARNING : Provenance Repository : Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.0; this file should be cleaned up manually
      13:59:53.549 [main] WARN org.apache.nifi.provenance.PersistentProvenanceRepository - Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.1; this file should be cleaned up manually
      WARNING : Provenance Repository : Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.1; this file should be cleaned up manually
      13:59:53.549 [main] WARN org.apache.nifi.provenance.PersistentProvenanceRepository - Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.2; this file should be cleaned up manually
      WARNING : Provenance Repository : Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.2; this file should be cleaned up manually
      13:59:53.549 [main] WARN org.apache.nifi.provenance.PersistentProvenanceRepository - Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.3; this file should be cleaned up manually
      WARNING : Provenance Repository : Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.3; this file should be cleaned up manually
      13:59:53.549 [main] WARN org.apache.nifi.provenance.PersistentProvenanceRepository - Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.4; this file should be cleaned up manually
      WARNING : Provenance Repository : Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.4; this file should be cleaned up manually
      13:59:53.549 [main] WARN org.apache.nifi.provenance.PersistentProvenanceRepository - Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.5; this file should be cleaned up manually
      WARNING : Provenance Repository : Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.5; this file should be cleaned up manually
      13:59:53.549 [main] WARN org.apache.nifi.provenance.PersistentProvenanceRepository - Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.6; this file should be cleaned up manually
      WARNING : Provenance Repository : Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.6; this file should be cleaned up manually
      13:59:53.549 [main] WARN org.apache.nifi.provenance.PersistentProvenanceRepository - Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.7; this file should be cleaned up manually
      WARNING : Provenance Repository : Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.7; this file should be cleaned up manually
      13:59:53.549 [main] WARN org.apache.nifi.provenance.PersistentProvenanceRepository - Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.8; this file should be cleaned up manually
      WARNING : Provenance Repository : Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.8; this file should be cleaned up manually
      13:59:53.549 [main] WARN org.apache.nifi.provenance.PersistentProvenanceRepository - Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.9; this file should be cleaned up manually
      WARNING : Provenance Repository : Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.9; this file should be cleaned up manually
      13:59:53.549 [main] WARN org.apache.nifi.provenance.PersistentProvenanceRepository - Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.10; this file should be cleaned up manually
      WARNING : Provenance Repository : Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.10; this file should be cleaned up manually
      13:59:53.549 [main] WARN org.apache.nifi.provenance.PersistentProvenanceRepository - Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.11; this file should be cleaned up manually
      WARNING : Provenance Repository : Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.11; this file should be cleaned up manually
      13:59:53.549 [main] WARN org.apache.nifi.provenance.PersistentProvenanceRepository - Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.12; this file should be cleaned up manually
      WARNING : Provenance Repository : Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.12; this file should be cleaned up manually
      13:59:53.549 [main] WARN org.apache.nifi.provenance.PersistentProvenanceRepository - Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.13; this file should be cleaned up manually
      WARNING : Provenance Repository : Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.13; this file should be cleaned up manually
      13:59:53.549 [main] WARN org.apache.nifi.provenance.PersistentProvenanceRepository - Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.14; this file should be cleaned up manually
      WARNING : Provenance Repository : Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.14; this file should be cleaned up manually
      13:59:53.549 [main] WARN org.apache.nifi.provenance.PersistentProvenanceRepository - Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.15; this file should be cleaned up manually
      WARNING : Provenance Repository : Failed to remove temporary journal file F:\code\nifi-minifi\minifi-nar-bundles\minifi-provenance-repository-bundle\minifi-persistent-provenance-repository\target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\journals\0.journal.15; this file should be cleaned up manually
      13:59:53.549 [main] INFO org.apache.nifi.provenance.PersistentProvenanceRepository - Successfully merged 16 journal files (15 records) into single Provenance Log File target\storage\3c8a0e0c-7a7b-47c2-ae6c-cffcf3c291b9\0.prov in 675 milliseconds

      Changing to Files.delete() on line MiNiFiPersistentProvenanceRepository:1810 gives more details:

      java.nio.file.FileSystemException: target\storage\b18da87f-e18a-457d-a55a-7ec3f80a5fe2\journals\0.journal.0: The process cannot access the file because it is being used by another process.

      at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
      at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
      at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
      at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
      at sun.nio.fs.AbstractFileSystemProvider.delete(Unknown Source)
      at java.nio.file.Files.delete(Unknown Source)
      at org.apache.nifi.provenance.MiNiFiPersistentProvenanceRepository.mergeJournals(MiNiFiPersistentProvenanceRepository.java:1810)
      at org.apache.nifi.provenance.MiNiFiPersistentProvenanceRepository.recoverJournalFiles(MiNiFiPersistentProvenanceRepository.java:1426)
      at org.apache.nifi.provenance.MiNiFiPersistentProvenanceRepositoryTest.testMergeJournalsEmptyJournal(MiNiFiPersistentProvenanceRepositoryTest.java:689)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
      at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
      at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      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:678)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

      No other obvious processes are running which could be using those files. I can successfully delete the files in question via Windows Explorer.

      Attachments

        Issue Links

          Activity

            People

              jzemerick Jeff Zemerick
              jzemerick Jeff Zemerick
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: