mirror of
https://github.com/apache/nifi.git
synced 2025-02-11 12:35:20 +00:00
NIFI-5740 Ensuring permissions are restored after test completes in TestFetchFile
Signed-off-by: Matthew Burgess <mattyb149@apache.org> This closes #3104
This commit is contained in:
parent
c8928ce350
commit
10479a5a2a
@ -210,13 +210,17 @@ public class TestFetchFile {
|
||||
moveTargetParentDir.mkdirs();
|
||||
moveTargetParentDir.setReadable(false);
|
||||
moveTargetParentDir.setWritable(false);
|
||||
try {
|
||||
runner.enqueue(new byte[0]);
|
||||
runner.run();
|
||||
runner.assertAllFlowFilesTransferred(FetchFile.REL_FAILURE, 1);
|
||||
runner.getFlowFilesForRelationship(FetchFile.REL_FAILURE).get(0).assertContentEquals("");
|
||||
|
||||
runner.enqueue(new byte[0]);
|
||||
runner.run();
|
||||
runner.assertAllFlowFilesTransferred(FetchFile.REL_FAILURE, 1);
|
||||
runner.getFlowFilesForRelationship(FetchFile.REL_FAILURE).get(0).assertContentEquals("");
|
||||
|
||||
assertTrue(sourceFile.exists());
|
||||
assertTrue(sourceFile.exists());
|
||||
} finally {
|
||||
moveTargetParentDir.setReadable(true);
|
||||
moveTargetParentDir.setWritable(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
x
Reference in New Issue
Block a user