Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342877 - with JDK 1.5, one of jaxb.listofobjects.ns.MapNamespaceTestCases failed
Summary: with JDK 1.5, one of jaxb.listofobjects.ns.MapNamespaceTestCases failed
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-14 14:44 EDT by Praba Vijayaratnam CLA
Modified: 2022-06-09 10:30 EDT (History)
1 user (show)

See Also:


Attachments
Patch (1.65 KB, patch)
2011-04-15 10:41 EDT, Rick Barkhouse CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Praba Vijayaratnam CLA 2011-04-14 14:44:05 EDT
This test failed result comparison (test case need to be altered... As of now it's failing while order of elements in result xml don't match control xml) 

EL 2.3.0.v20110414-r9230
JDK 1.5.0_22
-----------
org.eclipse.persistence.testing.jaxb.listofobjects.ns.MapNamespaceTestCases.Java Project Source w/SAX Parsing: MapNamespaceTestCase: testRoundTrip

-----------------
Documents are not equal. CONTROL: <?xml version="1.0" encoding="UTF-8"?><mapObject xmlns="http://www.example.org"><map><entry><key xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">One</key><value xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:int">1</value></entry><entry><key xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">Two</key><value xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:int">2</value></entry></map></mapObject> TEST: <?xml version="1.0" encoding="UTF-8"?><mapObject xmlns="http://www.example.org"><map><entry><key xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">Two</key><value xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:int">2</value></entry><entry><key xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">One</key><value xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:int">1</value></entry></map></mapObject> 

junit.framework.AssertionFailedError: Documents are not equal.
CONTROL:
One1Two2
TEST:
Two2One1
at org.eclipse.persistence.testing.oxm.XMLTestCase.assertXMLIdentical(XMLTestCase.java:45)
at org.eclipse.persistence.testing.oxm.mappings.XMLMappingTestCases.objectToXMLDocumentTest(XMLMappingTestCases.java:286)
at org.eclipse.persistence.testing.jaxb.JAXBTestCases.objectToXMLStringWriter(JAXBTestCases.java:275)
at org.eclipse.persistence.testing.jaxb.JAXBTestCases.testRoundTrip(JAXBTestCases.java:185)
Comment 1 Rick Barkhouse CLA 2011-04-15 10:41:44 EDT
Created attachment 193381 [details]
Patch
Comment 2 Rick Barkhouse CLA 2011-04-15 10:43:30 EDT
Fixed -- changed test object's hashmap to only contain one element, so that unpredictable element ordering does not break the test.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:30:53 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink