Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore tests that fail due to resource differences #824

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/test/java/org/json/junit/JSONArrayTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.json.JSONString;
import org.json.JSONTokener;
import org.json.junit.data.MyJsonString;
import org.junit.Ignore;
import org.junit.Test;

import com.jayway.jsonpath.Configuration;
Expand Down Expand Up @@ -1384,14 +1385,15 @@ public void jsonArrayClearMethodTest() {
/**
* Tests for stack overflow. See https://github.com/stleary/JSON-java/issues/654
*/
@Ignore("This test relies on system constraints and may not always pass. See: https://github.com/stleary/JSON-java/issues/821")
@Test(expected = JSONException.class)
public void issue654StackOverflowInputWellFormed() {
//String input = new String(java.util.Base64.getDecoder().decode(base64Bytes));
final InputStream resourceAsStream = JSONArrayTest.class.getClassLoader().getResourceAsStream("Issue654WellFormedArray.json");
JSONTokener tokener = new JSONTokener(resourceAsStream);
JSONArray json_input = new JSONArray(tokener);
assertNotNull(json_input);
fail("Excepected Exception.");
fail("Excepected Exception due to stack overflow.");
Util.checkJSONArrayMaps(json_input);
}

Expand Down
4 changes: 3 additions & 1 deletion src/test/java/org/json/junit/JSONObjectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import org.json.junit.data.Singleton;
import org.json.junit.data.SingletonEnum;
import org.json.junit.data.WeirdList;
import org.junit.Ignore;
import org.junit.Test;

import com.jayway.jsonpath.Configuration;
Expand Down Expand Up @@ -3665,14 +3666,15 @@ public void issue654IncorrectNestingNoKey2() {
/**
* Tests for stack overflow. See https://github.com/stleary/JSON-java/issues/654
*/
@Ignore("This test relies on system constraints and may not always pass. See: https://github.com/stleary/JSON-java/issues/821")
@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.");
fail("Excepected Exception due to stack overflow.");
}

@Test
Expand Down