mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
close FileInputStream before deleting file in FileOutput test
Otherwise, Windows won't let us delete it.
This commit is contained in:
parent
4a9ff55060
commit
b4941cddbe
@ -25,6 +25,7 @@ public class FileOutput {
|
||||
while ((c = in.read(buffer, offset, buffer.length - offset)) != -1) {
|
||||
offset += c;
|
||||
}
|
||||
in.close();
|
||||
|
||||
if (! "Hello world!\nHello world again!".equals
|
||||
(new String(buffer, 0, offset)))
|
||||
@ -32,7 +33,7 @@ public class FileOutput {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
} finally {
|
||||
new File("test.txt").delete();
|
||||
expect(new File("test.txt").delete());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user