You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by al...@apache.org on 2016/04/19 07:20:39 UTC
[14/17] nifi git commit: NIFI-1654 - Adjusting file handling for
TestFileSystemRepository to address the following in the CI environment.
testBogusFile on
testBogusFile(org.apache.nifi.controller.repository.TestFileSystemRepository)(org.apache.nifi.contr
NIFI-1654 - Adjusting file handling for TestFileSystemRepository to address the following in the CI environment.
testBogusFile on testBogusFile(org.apache.nifi.controller.repository.TestFileSystemRepository)(org.apache.nifi.controller.repository.TestFileSystemRepository) Time elapsed: 0.418 sec <<< FAILURE!
java.lang.AssertionError: null
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at org.apache.nifi.controller.repository.TestFileSystemRepository.testBogusFile(TestFileSystemRepository.java:122)
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/449493e1
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/449493e1
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/449493e1
Branch: refs/heads/NIFI-1654
Commit: 449493e15416d8c442b5b7bedf66df93ff6f8b58
Parents: 7bd747d
Author: Aldrin Piri <al...@apache.org>
Authored: Sun Apr 17 10:25:05 2016 -0400
Committer: Aldrin Piri <al...@apache.org>
Committed: Tue Apr 19 01:19:45 2016 -0400
----------------------------------------------------------------------
.../nifi/controller/repository/TestFileSystemRepository.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/449493e1/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/repository/TestFileSystemRepository.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/repository/TestFileSystemRepository.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/repository/TestFileSystemRepository.java
index c40d0e3..dee807b 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/repository/TestFileSystemRepository.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/repository/TestFileSystemRepository.java
@@ -44,7 +44,9 @@ import org.apache.nifi.stream.io.StreamUtils;
import org.apache.nifi.util.NiFiProperties;
import org.junit.After;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
import org.slf4j.LoggerFactory;
import ch.qos.logback.classic.Level;
@@ -54,15 +56,17 @@ import ch.qos.logback.core.read.ListAppender;
public class TestFileSystemRepository {
- public static final int NUM_REPO_SECTIONS = 1;
+ @Rule
+ public TemporaryFolder rootTestFolder = new TemporaryFolder();
public static final File helloWorldFile = new File("src/test/resources/hello.txt");
private FileSystemRepository repository = null;
- private final File rootFile = new File("target/content_repository");
+ private File rootFile;
@Before
public void setup() throws IOException {
+ rootFile = new File(rootTestFolder.getRoot().getAbsolutePath() + "/content_repository");
System.setProperty(NiFiProperties.PROPERTIES_FILE_PATH, "src/test/resources/nifi.properties");
if (rootFile.exists()) {
DiskUtils.deleteRecursively(rootFile);