srdo commented on a change in pull request #3101: STORM-1515: Fix LocalState
Corruption
URL: https://github.com/apache/storm/pull/3101#discussion_r316252406
##########
File path: storm-server/src/test/java/org/apache/storm/LocalStateTest.java
##########
@@ -66,6 +66,19 @@ public void testEmptyState() throws IOException {
Assert.assertNull(ls.get("c"));
ls.put("a", gs_a);
Assert.assertEquals(gs_a, ls.get("a"));
+ }
+ @Test
+ public void testAllNulState() throws IOException {
+ TmpPath tmp_dir = new TmpPath();
+ String dir = tmp_dir.getPath();
+ LocalState ls = new LocalState(dir, true);
+ GlobalStreamId gs_a = new GlobalStreamId("a", "a");
+ FileOutputStream data = FileUtils.openOutputStream(new File(dir,
"12345"));
Review comment:
Please use try with resources for these streams as well. Fixing the same
issues in testEmptyState would be nice too.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services