From 689a80d3ce310c3b617537550a529b9a1dc80f4b Mon Sep 17 00:00:00 2001 From: dchitlangia Date: Thu, 1 Aug 2019 02:06:03 -0400 Subject: [PATCH] HDDS-1886. Use ArrayList#clear to address audit failure scenario Signed-off-by: Anu Engineer --- .../org/apache/hadoop/ozone/audit/TestOzoneAuditLogger.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-hdds/common/src/test/java/org/apache/hadoop/ozone/audit/TestOzoneAuditLogger.java b/hadoop-hdds/common/src/test/java/org/apache/hadoop/ozone/audit/TestOzoneAuditLogger.java index 77a6c0badd..518ddaedcf 100644 --- a/hadoop-hdds/common/src/test/java/org/apache/hadoop/ozone/audit/TestOzoneAuditLogger.java +++ b/hadoop-hdds/common/src/test/java/org/apache/hadoop/ozone/audit/TestOzoneAuditLogger.java @@ -153,7 +153,7 @@ private void verifyLog(String expected) throws IOException { assertTrue(lines.size() != 0); assertTrue(expected.equalsIgnoreCase(lines.get(0))); //empty the file - lines.remove(0); + lines.clear(); FileUtils.writeLines(file, lines, false); }