-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Test case passes on some runs and fails on others: org.json.junit.JSONObjectTest.issue654StackOverflowInputWellFormed
- Test Run: https://github.com/stleary/JSON-java/actions/runs/6644866305/job/18054932906#step:5:79
- Code Link:
JSON-java/src/test/java/org/json/junit/JSONObjectTest.java
Lines 3668 to 3676 in b5b9f63
@Test(expected = JSONException.class) public void issue654StackOverflowInputWellFormed() { //String input = new String(java.util.Base64.getDecoder().decode(base64Bytes)); final InputStream resourceAsStream = JSONObjectTest.class.getClassLoader().getResourceAsStream("Issue654WellFormedObject.json"); JSONTokener tokener = new JSONTokener(resourceAsStream); JSONObject json_input = new JSONObject(tokener); assertNotNull(json_input); fail("Excepected Exception."); }
Appears to be due to differences in resources available on each run. The exception expected is a "JSONException", but that's because it is wrapping a "StackOverflowError". StackOverflowError is going to be dependent on the environment and may not hit consistently.
Metadata
Metadata
Assignees
Labels
No labels