Avoid ComparisonUtils::assertXmlEquals (compareXml) in CI to reduce execution time#3762
Open
samirromdhani wants to merge 4 commits intomainfrom
Open
Avoid ComparisonUtils::assertXmlEquals (compareXml) in CI to reduce execution time#3762samirromdhani wants to merge 4 commits intomainfrom
samirromdhani wants to merge 4 commits intomainfrom
Conversation
a223955 to
23c88e8
Compare
08495c9 to
aa8837e
Compare
aa8837e to
f995903
Compare
f995903 to
f944259
Compare
|
093914a to
d4e0da0
Compare
e7f6546 to
cf4e689
Compare
|
rolnico
requested changes
Mar 26, 2026
Member
rolnico
left a comment
There was a problem hiding this comment.
Multiple conflits have to be resolved
| public static void assertTxtEquals(String expected, String actual) { | ||
| String expectedStr = TestUtil.normalizeLineSeparator(expected); | ||
| String actualStr = TestUtil.normalizeLineSeparator(actual); | ||
| // Ensure element ends with exactly one newline before assertion |
Member
There was a problem hiding this comment.
Suggested change
| // Ensure element ends with exactly one newline before assertion | |
| // Ensure elements end with a newline before assertion |
Comment on lines
+96
to
+97
| * Writes the given data using the provided write function, then compares the resulting text file to the specified reference. | ||
| * @return the path of written file. |
Member
There was a problem hiding this comment.
Suggested change
| * Writes the given data using the provided write function, then compares the resulting text file to the specified reference. | |
| * @return the path of written file. | |
| * Write the given data using the provided write function, then compares the resulting text file to the specified reference. | |
| * @return the path of the written file. |
Contributor
Author
|
draft for now until fix conflicts |
Signed-off-by: Olivier Perrin <olivier.perrin@rte-france.com>
Signed-off-by: Olivier Perrin <olivier.perrin@rte-france.com>
cd706f0 to
139f3d6
Compare
Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
139f3d6 to
fb50ce2
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
Fixes #2817
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
Other information:
All updated tests pass successfully with
assertXmlEquals.The test class EncodingTest is excluded from this change. keep using assertXml, since its purpose is specifically to verify encoding behavior. Replacing it with a plain text comparison would not align with the purpose of the test.
setSortedin Export options (round-trip validation)Since setSorted is mutable in some test scenarios, it may introduce variability in execution time. This area could be optimized to ensure more consistent performance.
Summary
In the IIDM SerDe module, most of the tests were updated to use assertTxt instead of assertXml.
mvn testBefor (~30,558 s)
After (~22,2 s)