You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky test fails intermittently in GitHub Action #821
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.
I think this test case should be removed, as it never guarantees the behavior. To identify the max depth supported, we can test through configuration. And environment resource related runtime error expectation need not be tested.
@stleary , I'm leaning towards just marking the test as a "skip/ignore" or removing it altogether. It seems like this test would need regular maintenance to ensure that it was consistently hitting stack overflows.
@Ignore("This test relies on system constraints and may not always pass.")
@Test(expected = JSONException.class)
publicvoidissue654StackOverflowInputWellFormed() {
//String input = new String(java.util.Base64.getDecoder().decode(base64Bytes)); finalInputStreamresourceAsStream = JSONObjectTest.class.getClassLoader().getResourceAsStream("Issue654WellFormedObject.json");
JSONTokenertokener = newJSONTokener(resourceAsStream);
JSONObjectjson_input = newJSONObject(tokener);
assertNotNull(json_input);
fail("Excepected Exception.");
}
Activity
rudrajyotib commentedon Oct 28, 2023
I think this test case should be removed, as it never guarantees the behavior. To identify the max depth supported, we can test through configuration. And environment resource related runtime error expectation need not be tested.
stleary commentedon Oct 29, 2023
Might be better to see if the test can be fixed, although if you see a chance to add a unit test, that is fine too.
johnjaylward commentedon Oct 30, 2023
@stleary , I'm leaning towards just marking the test as a "skip/ignore" or removing it altogether. It seems like this test would need regular maintenance to ensure that it was consistently hitting stack overflows.
stleary commentedon Oct 31, 2023
@johnjaylward Fair enough, better to silence the test, than have it fail intermittently.
rudrajyotib commentedon Nov 4, 2023
@johnjaylward - are you annotating the test with Ignore?
Fixes stleary#821
Fixes stleary#821