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/17 16:25:25 UTC

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.controller.re

Repository: nifi
Updated Branches:
  refs/heads/NIFI-1654 ea7940d61 -> ab7d093f7


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/ab7d093f
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/ab7d093f
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/ab7d093f

Branch: refs/heads/NIFI-1654
Commit: ab7d093f707bdee7384aa88a8d8755a192fcb45d
Parents: ea7940d
Author: Aldrin Piri <al...@apache.org>
Authored: Sun Apr 17 10:25:05 2016 -0400
Committer: Aldrin Piri <al...@apache.org>
Committed: Sun Apr 17 10:25:05 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/ab7d093f/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);