From 1cf5e40838ba75fd91de871a10c17eabd63a04ed Mon Sep 17 00:00:00 2001 From: Akira Ajisaka Date: Mon, 27 Jul 2015 13:17:24 +0900 Subject: [PATCH] HDFS-8810. Correct assertions in TestDFSInotifyEventInputStream class. Contributed by Surendra Singh Lilhore. (cherry picked from commit 1df78688c69476f89d16f93bc74a4f05d0b1a3da) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../apache/hadoop/hdfs/TestDFSInotifyEventInputStream.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 42eef55fe7b..fed59180bf0 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -741,6 +741,9 @@ Release 2.8.0 - UNRELEASED HDFS-8773. Few FSNamesystem metrics are not documented in the Metrics page. (Rakesh R via cnauroth) + HDFS-8810. Correct assertions in TestDFSInotifyEventInputStream class. + (Surendra Singh Lilhore via aajisaka) + Release 2.7.2 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSInotifyEventInputStream.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSInotifyEventInputStream.java index 65569d03133..e7bbcac2811 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSInotifyEventInputStream.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSInotifyEventInputStream.java @@ -164,7 +164,7 @@ public void testBasic() throws IOException, URISyntaxException, Event.RenameEvent re2 = (Event.RenameEvent) batch.getEvents()[0]; Assert.assertTrue(re2.getDstPath().equals("/file2")); Assert.assertTrue(re2.getSrcPath().equals("/file4")); - Assert.assertTrue(re.getTimestamp() > 0); + Assert.assertTrue(re2.getTimestamp() > 0); LOG.info(re2.toString()); // AddOp with overwrite @@ -378,7 +378,7 @@ public void testBasic() throws IOException, URISyntaxException, Event.RenameEvent re3 = (Event.RenameEvent) batch.getEvents()[0]; Assert.assertTrue(re3.getDstPath().equals("/dir/file5")); Assert.assertTrue(re3.getSrcPath().equals("/file5")); - Assert.assertTrue(re.getTimestamp() > 0); + Assert.assertTrue(re3.getTimestamp() > 0); LOG.info(re3.toString()); // TruncateOp