From 24015b7684d326969bdacffb071c7bbc6f1a4fc4 Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Wed, 17 Oct 2012 04:39:07 +0000 Subject: [PATCH] HDFS-4055. TestAuditLogs is flaky. Contributed by Binglin Chang git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1399093 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ .../org/apache/hadoop/hdfs/server/namenode/TestAuditLogs.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 4acb04e730f..39e0b6803d6 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -461,6 +461,8 @@ Release 2.0.3-alpha - Unreleased HDFS-3997. OfflineImageViewer incorrectly passes value of imageVersion when visiting IS_COMPRESSED element. (Mithun Radhakrishnan via atm) + HDFS-4055. TestAuditLogs is flaky. (Binglin Chang via eli) + Release 2.0.2-alpha - 2012-09-07 INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestAuditLogs.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestAuditLogs.java index eb31ef9710e..0fe6255fc9a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestAuditLogs.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestAuditLogs.java @@ -117,7 +117,7 @@ public class TestAuditLogs { int val = istream.read(); istream.close(); verifyAuditLogs(true); - assertTrue("failed to read from file", val > 0); + assertTrue("failed to read from file", val >= 0); } /** test that allowed stat puts proper entry in audit log */ @@ -168,7 +168,7 @@ public class TestAuditLogs { istream.close(); verifyAuditLogsRepeat(true, 3); - assertTrue("failed to read from file", val > 0); + assertTrue("failed to read from file", val >= 0); } /** test that stat via webhdfs puts proper entry in audit log */