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

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

Sorry, my last message was a little bit confused. 
Without apply the patch KNOX-436-1.patch. the issue is fixed on master branch
with
from 
./gateway-provider-ha/src/test/java/org/apache/hadoop/gateway/ha/provider/impl/HaDescriptorManagerTest.java:

 assertThat( the( descriptorXml ), isEquivalentTo( the( xml ) ) );
  instead of my proposal :  
 assertXMLEqual(xml, descriptorXml);

So, we can close this issue. Thx for your help

> 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