Remove repo cleanup in favor of delegation to JUnit TemporaryFolder.
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/81313dda Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/81313dda Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/81313dda Branch: refs/heads/appveyor-improvement Commit: 81313dda6cfa9708aad70c653fc96646eeeb89fd Parents: c49243e Author: Aldrin Piri <[email protected]> Authored: Fri Oct 14 13:37:26 2016 -0400 Committer: Aldrin Piri <[email protected]> Committed: Fri Oct 21 15:54:33 2016 -0400 ---------------------------------------------------------------------- .../TestPersistentProvenanceRepository.java | 24 -------------------- 1 file changed, 24 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/81313dda/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/TestPersistentProvenanceRepository.java ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/TestPersistentProvenanceRepository.java b/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/TestPersistentProvenanceRepository.java index 4a0cd84..0fcbacd 100644 --- a/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/TestPersistentProvenanceRepository.java +++ b/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/TestPersistentProvenanceRepository.java @@ -146,30 +146,6 @@ public class TestPersistentProvenanceRepository { } catch (final IOException ioe) { } } - - // Delete all of the storage files. We do this in order to clean up the tons of files that - // we create but also to ensure that we have closed all of the file handles. If we leave any - // streams open, for instance, this will throw an IOException, causing our unit test to fail. - for (final File storageDir : config.getStorageDirectories()) { - int i; - for (i = 0; i < 3; i++) { - try { - FileUtils.deleteFile(storageDir, true); - break; - } catch (final IOException ioe) { - // if there is a virus scanner, etc. running in the background we may not be able to - // delete the file. Wait a sec and try again. - if (i == 2) { - throw ioe; - } else { - try { - Thread.sleep(1000L); - } catch (final InterruptedException ie) { - } - } - } - } - } }
