HADOOP-9429. TestConfiguration fails with IBM JAVA. Contributed by Amir Sanjar.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1464725 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
547d2b0bac
commit
28c74a21ea
@ -610,6 +610,9 @@ Release 2.0.5-beta - UNRELEASED
|
|||||||
HADOOP-9125. LdapGroupsMapping threw CommunicationException after some
|
HADOOP-9125. LdapGroupsMapping threw CommunicationException after some
|
||||||
idle time. (Kai Zheng via atm)
|
idle time. (Kai Zheng via atm)
|
||||||
|
|
||||||
|
HADOOP-9429. TestConfiguration fails with IBM JAVA. (Amir Sanjar via
|
||||||
|
suresh)
|
||||||
|
|
||||||
Release 2.0.4-alpha - UNRELEASED
|
Release 2.0.4-alpha - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -51,6 +51,10 @@ public class TestConfiguration extends TestCase {
|
|||||||
final static String CONFIG = new File("./test-config.xml").getAbsolutePath();
|
final static String CONFIG = new File("./test-config.xml").getAbsolutePath();
|
||||||
final static String CONFIG2 = new File("./test-config2.xml").getAbsolutePath();
|
final static String CONFIG2 = new File("./test-config2.xml").getAbsolutePath();
|
||||||
final static Random RAN = new Random();
|
final static Random RAN = new Random();
|
||||||
|
final static boolean IBMJAVA = System.getProperty("java.vendor").contains("IBM");
|
||||||
|
final static String XMLHEADER =
|
||||||
|
IBMJAVA?"<?xml version=\"1.0\" encoding=\"UTF-8\"?><configuration>":
|
||||||
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><configuration>";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
@ -327,8 +331,8 @@ public void testWriteXml() throws IOException {
|
|||||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||||
conf.writeXml(baos);
|
conf.writeXml(baos);
|
||||||
String result = baos.toString();
|
String result = baos.toString();
|
||||||
assertTrue("Result has proper header", result.startsWith(
|
assertTrue("Result has proper header", result.startsWith(XMLHEADER));
|
||||||
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><configuration>"));
|
|
||||||
assertTrue("Result has proper footer", result.endsWith("</configuration>"));
|
assertTrue("Result has proper footer", result.endsWith("</configuration>"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user