Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-5963

Test failure in TestFileSystemRepository caused by DiskUtils.deleteRecursively

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.8.0
    • None
    • Core Framework
    • None
    • Rhel 7.5
      NiFi 1.8
      JDK 1.8.0_175

    Description

      I'm trying to build NiFi but I keep getting the following errors:

      //@Before
      java.lang.AssertionError: Unable to delete target/content_repository/1 expected null, but was:<target/content_repository/1>
      
      at org.junit.Assert.fail(Assert.java:88)
      at org.junit.Assert.failNotNull(Assert.java:755)
      at org.junit.Assert.assertNull(Assert.java:737)
      at org.apache.nifi.controller.repository.util.DiskUtils.deleteRecursively(DiskUtils.java:47)
      at org.apache.nifi.controller.repository.TestFileSystemRepository.setup(TestFileSystemRepository.java:77)
      
      //@After
      java.lang.NullPointerException
      at org.apache.nifi.controller.repository.TestFileSystemRepository.shutdown(TestFileSystemRepository.java:87)

       

      I've traced this to the multiple test methods trying to modify the content repository concurrently. When I run the tests 1 by 1 they all pass; to make them work with maven build I've made the following changes:

      private final File rootFile = new File("target/content_repository/" + UUID.randomUUID().toString());
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            korir Gideon Korir
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: