From 9d2b1b2ee860c0be8afc7981e50edcff1d849f5b Mon Sep 17 00:00:00 2001 From: Tsz-wo Sze Date: Thu, 14 Jun 2012 20:17:54 +0000 Subject: [PATCH] HDFS-3524. Update TestFileLengthOnClusterRestart for HDFS-3522. Contributed by Brandon Li git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1350384 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../apache/hadoop/hdfs/TestFileLengthOnClusterRestart.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 e17614283d..c1c434d761 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -341,6 +341,9 @@ Branch-2 ( Unreleased changes ) HDFS-3480. Multiple SLF4J binding warning. (Vinay via eli) + HDFS-3524. Update TestFileLengthOnClusterRestart for HDFS-3522. (Brandon + Li via szetszwo) + BREAKDOWN OF HDFS-3042 SUBTASKS HDFS-2185. HDFS portion of ZK-based FailoverController (todd) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileLengthOnClusterRestart.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileLengthOnClusterRestart.java index 5f9ad3259d..f63ba9a53a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileLengthOnClusterRestart.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileLengthOnClusterRestart.java @@ -65,8 +65,8 @@ public void testFileLengthWithHSyncAndClusterRestartWithOutDNsRegister() in = (HdfsDataInputStream) dfs.open(path); Assert.fail("Expected IOException"); } catch (IOException e) { - Assert.assertEquals("Could not obtain the last block locations.", e - .getLocalizedMessage()); + Assert.assertTrue(e.getLocalizedMessage().indexOf( + "Name node is in safe mode") >= 0); } } finally { if (null != in) {