ctubbsii commented on a change in pull request #2181:
URL: https://github.com/apache/accumulo/pull/2181#discussion_r669104267



##########
File path: 
server/tserver/src/test/java/org/apache/accumulo/tserver/log/RecoveryLogsIteratorTest.java
##########
@@ -161,24 +161,20 @@ public void testFinishMarker() throws IOException {
 
     createRecoveryDir(logs, dirs, false);
 
-    assertThrows("Finish marker should not be found", IOException.class, () -> 
new RecoveryLogsIterator(context, dirs, null, null, false));
+    assertThrows("Finish marker should not be found", IOException.class,
+        () -> new RecoveryLogsIterator(context, dirs, null, null, false));
   }
 
   @Test
   public void testSingleFile() throws IOException {
     String destPath = workDir + "/test.rf";
     fs.create(new Path(destPath));
 
-    try (RecoveryLogsIterator rli = new RecoveryLogsIterator(context,
-        Collections.singletonList(new Path(destPath)), null, null, false)) {
-      while (rli.hasNext()) {
-        fail(
-            "Finish marker should not be found for a single file. Exception 
should have been thrown.");
-      }
-    } catch (IOException e) {
-      fs.delete(new Path(destPath));
-      // Expected exception
-    }
+    assertThrows("Finish marker should not be found for a single file.", 
IOException.class,
+        () -> new RecoveryLogsIterator(context, Collections.singletonList(new 
Path(destPath)), null,
+            null, false));
+
+    fs.delete(new Path(destPath));

Review comment:
       You don't even need to delete the file, since the folder is temporary.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to