Return-Path: X-Original-To: apmail-hadoop-common-commits-archive@www.apache.org Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 915F0F4DC for ; Thu, 4 Apr 2013 20:26:42 +0000 (UTC) Received: (qmail 69299 invoked by uid 500); 4 Apr 2013 20:26:42 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 69229 invoked by uid 500); 4 Apr 2013 20:26:41 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 69221 invoked by uid 99); 4 Apr 2013 20:26:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Apr 2013 20:26:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Apr 2013 20:26:40 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id BB8F923888CD; Thu, 4 Apr 2013 20:26:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1464725 - in /hadoop/common/trunk/hadoop-common-project/hadoop-common: CHANGES.txt src/test/java/org/apache/hadoop/conf/TestConfiguration.java Date: Thu, 04 Apr 2013 20:26:20 -0000 To: common-commits@hadoop.apache.org From: suresh@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130404202620.BB8F923888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: suresh Date: Thu Apr 4 20:26:20 2013 New Revision: 1464725 URL: http://svn.apache.org/r1464725 Log: HADOOP-9429. TestConfiguration fails with IBM JAVA. Contributed by Amir Sanjar. Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1464725&r1=1464724&r2=1464725&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt (original) +++ hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt Thu Apr 4 20:26:20 2013 @@ -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 Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java?rev=1464725&r1=1464724&r2=1464725&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java (original) +++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java Thu Apr 4 20:26:20 2013 @@ -51,6 +51,10 @@ public class TestConfiguration extends T 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 T 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("")); }