Merge pull request #798 from hofi1/bugfix/fix-XML-flacky-test

fix: flakiness in org.json.junit.XMLTest#testIndentComplicatedJsonObjectWithArrayAndWithConfig
This commit is contained in:
Sean Leary 2023-10-17 13:52:29 -05:00 committed by GitHub
commit d677a99f4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1234,7 +1234,7 @@ public class XMLTest {
for (int numRead; (numRead = in.read(buffer, 0, buffer.length)) > 0; ) {
expected.append(buffer, 0, numRead);
}
assertEquals(expected.toString(), actualString);
assertTrue(XML.toJSONObject(expected.toString()).similar(XML.toJSONObject(actualString)));
}
} catch (IOException e) {
fail("file writer error: " +e.getMessage());