From 5dda3257141da3ce815a7b37efe2a72a937b2a5e Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Thu, 4 Apr 2013 20:29:32 +0000 Subject: [PATCH] HADOOP-9429. Merging change 1464725 from trunk git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1464728 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/conf/TestConfiguration.java | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index bb9fe7ff424..3b944494b08 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -107,6 +107,9 @@ Release 2.0.5-beta - UNRELEASED HADOOP-9357. Fallback to default authority if not specified in FileContext. (Andrew Wang via eli) + HADOOP-9429. TestConfiguration fails with IBM JAVA. (Amir Sanjar via + suresh) + Release 2.0.4-alpha - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java index aa975270aca..299301427e4 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java @@ -51,6 +51,10 @@ public class TestConfiguration extends TestCase { final static String CONFIG = new File("./test-config.xml").getAbsolutePath(); final static String CONFIG2 = new File("./test-config2.xml").getAbsolutePath(); final static Random RAN = new Random(); + final static boolean IBMJAVA = System.getProperty("java.vendor").contains("IBM"); + final static String XMLHEADER = + IBMJAVA?"": + ""; @Override protected void setUp() throws Exception { @@ -327,8 +331,8 @@ public class TestConfiguration extends TestCase { ByteArrayOutputStream baos = new ByteArrayOutputStream(); conf.writeXml(baos); String result = baos.toString(); - assertTrue("Result has proper header", result.startsWith( - "")); + assertTrue("Result has proper header", result.startsWith(XMLHEADER)); + assertTrue("Result has proper footer", result.endsWith("")); }