[ 
https://issues.apache.org/jira/browse/KNOX-436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14616662#comment-14616662
 ] 

pascal oliva commented on KNOX-436:
-----------------------------------

Fixed on master branch :
Running org.apache.hadoop.gateway.ha.provider.impl.HaDescriptorManagerTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in 
org.apache.hadoop.gateway.ha.provider.impl.HaDescriptorManagerTest

with
$ mvn -version
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 
2014-02-14T11:37:52-06:00)
Maven home: /opt/apache-maven-3.2.1
Java version: 1.7.0, vendor: IBM Corporation
Java home: /usr/lib/jvm/ibm-java-ppc64le-71/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-229.7.2.ael7b.ppc64le", arch: "ppc64le", 
family: "unix"


> HaDescriptorManagerTest fail with IBM JVM JAVA
> ----------------------------------------------
>
>                 Key: KNOX-436
>                 URL: https://issues.apache.org/jira/browse/KNOX-436
>             Project: Apache Knox
>          Issue Type: Test
>          Components: Server
>    Affects Versions: 0.6.0
>         Environment: ppc64 - RHEL 7 - Java version: 1.7.0, vendor: IBM 
> Corporation 
>            Reporter: pascal oliva
>             Fix For: 0.7.0
>
>         Attachments: KNOX-436-1.patch
>
>
> With JVM IBM : HaDescriptorManagerTest failed :
> Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.159 sec <<< 
> FAILURE! - in 
> org.apache.hadoop.gateway.ha.provider.impl.HaDescriptorManagerTest
> testDescriptorStoring(org.apache.hadoop.gateway.ha.provider.impl.HaDescriptorManagerTest)
>   Time elapsed: 0.076 sec  <<< FAILURE!
> org.junit.ComparisonFailure: expected:<...Sleep="8000"/>
> </ha>[
> ]> but was:<...Sleep="8000"/>
> </ha>[]>
> Test impacted : testDescriptorStoring
> ...
>       HaDescriptorManager.store(descriptor, writer);
>       String descriptorXml = writer.toString();
> ...
> by using  JAVA JVM IBM there is no "\n" at the end of the xml string 
> <descriptorXml>
> So,
> the test failed with assertEquals(xml, descriptorXml); due to "\n" into 
> "...</ha>\n";
>  String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" 
> standalone=\"yes\"?>\n" +
>             "<ha>\n" +
>             "  <service enabled=\"false\" failoverSleep=\"1000\" 
> maxFailoverAttempts=\"42\" maxRet:a!ryAttempts=\"3\" name=\"foo\" 
> retrySleep=\"3000\"/>\n" +
>             "  <service enabled=\"true\" failoverSleep=\"5000\" 
> maxFailoverAttempts=\"3\" maxRetryAttempts=\"5\" name=\"bar\" 
> retrySleep=\"8000\"/>\n" +
>             "</ha>\n";
>       assertEquals(xml, descriptorXml);
>         
> The test passed without "\n" at the end of the string (xml) used to compare 
> the expected result:
>  string xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" 
> standalone=\"yes\"?>\n" +
>             "<ha>\n" +
>             "  <service enabled=\"false\" failoverSleep=\"1000\" 
> maxFailoverAttempts=\"42\" maxRet:a!ryAttempts=\"3\" name=\"foo\" 
> retrySleep=\"3000\"/>\n" +
>             "  <service enabled=\"true\" failoverSleep=\"5000\" 
> maxFailoverAttempts=\"3\" maxRetryAttempts=\"5\" name=\"bar\" 
> retrySleep=\"8000\"/>\n" +
>             "</ha>\;



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to