wang3820 opened a new pull request, #3421:
URL: https://github.com/apache/hop/pull/3421

   ### Issue
   The issue is that in test 
`org.apache.hop.core.svg.HopSvgGraphics2DTest#testNewDocumentXml`
    and  
`org.apache.hop.core.svg.HopSvgGraphics2DTest#testNewDocumentSimpleXml`, inside 
`graphics2D.toXml`, `org.apache.batik.svggen.SVGGraphics2D.getRoot`, which uses 
a `HashMap` iterator to generate the DOM, is called. Since the order of HashMap 
is unpredictable, the order of elements in generated xml string is 
nondeterministic. 
   
   ## Fix
   This flaky test has been fixed through leveraging the Jackson library, which 
incorporates the JsonNode and XmlParser classes. These components are employed 
for parsing two XML strings into tree models, which are subsequently compared 
node by node when assertion is called. 
   
   I understand this fix introduces a new dependency. If prefered, I'm happy to 
come up with a fix without `com.fasterxml.jackson.dataformat.xml.XmlMapper`.
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   - [x] Run `mvn clean install apache-rat:check` to make sure basic checks 
pass. A more thorough check will be performed on your pull request 
automatically.
   - [x] If you have a group of commits related to the same change, please 
squash your commits into one and force push your branch using `git rebase -i`.
   - [ ] Mention the appropriate issue in your description (for example: 
`addresses #123`), if applicable.
   
   To make clear that you license your contribution under the [Apache License 
Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   - [x] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to