You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Gideon Korir (JIRA)" <ji...@apache.org> on 2019/01/18 14:27:00 UTC

[jira] [Created] (NIFI-5963) Test failure in TestFileSystemRepository caused by DiskUtils.deleteRecursively

Gideon Korir created NIFI-5963:
----------------------------------

             Summary: Test failure in TestFileSystemRepository caused by DiskUtils.deleteRecursively
                 Key: NIFI-5963
                 URL: https://issues.apache.org/jira/browse/NIFI-5963
             Project: Apache NiFi
          Issue Type: Improvement
          Components: Core Framework
    Affects Versions: 1.8.0
         Environment: Rhel 7.5
NiFi 1.8
JDK 1.8.0_175
            Reporter: Gideon Korir


I'm trying to build NiFi but I keep getting the following errors:
{code:java}
//@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){code}
 

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:
{code:java}
private final File rootFile = new File("target/content_repository/" + UUID.randomUUID().toString());
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)