diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 41964745ae..2f755073d5 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -610,6 +610,9 @@ Release 2.0.5-beta - UNRELEASED HADOOP-9125. LdapGroupsMapping threw CommunicationException after some idle time. (Kai Zheng via atm) + 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 8f5963c22c..19ff6c6c99 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 void testWriteXml() throws IOException { 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("")); }