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

Kevin Minder commented on KNOX-436:
-----------------------------------

[~poliva] < Unfortunately I'm unable to cleanly apply this patch to master now. 
 Can you please rebase it and upload a revised patch and I'll get it in ASAP.  
Sorry for the delay.

> 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