mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 03:15:32 -04:00
Fixes #821
add ignore annotation to tests that may fail due to differences in machine resources and can't be controlled via the tests
This commit is contained in:
parent
783d298f99
commit
a3742acf74
@ -32,6 +32,7 @@ import org.json.JSONPointerException;
|
|||||||
import org.json.JSONString;
|
import org.json.JSONString;
|
||||||
import org.json.JSONTokener;
|
import org.json.JSONTokener;
|
||||||
import org.json.junit.data.MyJsonString;
|
import org.json.junit.data.MyJsonString;
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import com.jayway.jsonpath.Configuration;
|
import com.jayway.jsonpath.Configuration;
|
||||||
@ -1384,6 +1385,7 @@ public class JSONArrayTest {
|
|||||||
/**
|
/**
|
||||||
* Tests for stack overflow. See https://github.com/stleary/JSON-java/issues/654
|
* 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)
|
@Test(expected = JSONException.class)
|
||||||
public void issue654StackOverflowInputWellFormed() {
|
public void issue654StackOverflowInputWellFormed() {
|
||||||
//String input = new String(java.util.Base64.getDecoder().decode(base64Bytes));
|
//String input = new String(java.util.Base64.getDecoder().decode(base64Bytes));
|
||||||
@ -1391,7 +1393,7 @@ public class JSONArrayTest {
|
|||||||
JSONTokener tokener = new JSONTokener(resourceAsStream);
|
JSONTokener tokener = new JSONTokener(resourceAsStream);
|
||||||
JSONArray json_input = new JSONArray(tokener);
|
JSONArray json_input = new JSONArray(tokener);
|
||||||
assertNotNull(json_input);
|
assertNotNull(json_input);
|
||||||
fail("Excepected Exception.");
|
fail("Excepected Exception due to stack overflow.");
|
||||||
Util.checkJSONArrayMaps(json_input);
|
Util.checkJSONArrayMaps(json_input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ import org.json.junit.data.RecursiveBeanEquals;
|
|||||||
import org.json.junit.data.Singleton;
|
import org.json.junit.data.Singleton;
|
||||||
import org.json.junit.data.SingletonEnum;
|
import org.json.junit.data.SingletonEnum;
|
||||||
import org.json.junit.data.WeirdList;
|
import org.json.junit.data.WeirdList;
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import com.jayway.jsonpath.Configuration;
|
import com.jayway.jsonpath.Configuration;
|
||||||
@ -3665,6 +3666,7 @@ public class JSONObjectTest {
|
|||||||
/**
|
/**
|
||||||
* Tests for stack overflow. See https://github.com/stleary/JSON-java/issues/654
|
* 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)
|
@Test(expected = JSONException.class)
|
||||||
public void issue654StackOverflowInputWellFormed() {
|
public void issue654StackOverflowInputWellFormed() {
|
||||||
//String input = new String(java.util.Base64.getDecoder().decode(base64Bytes));
|
//String input = new String(java.util.Base64.getDecoder().decode(base64Bytes));
|
||||||
@ -3672,7 +3674,7 @@ public class JSONObjectTest {
|
|||||||
JSONTokener tokener = new JSONTokener(resourceAsStream);
|
JSONTokener tokener = new JSONTokener(resourceAsStream);
|
||||||
JSONObject json_input = new JSONObject(tokener);
|
JSONObject json_input = new JSONObject(tokener);
|
||||||
assertNotNull(json_input);
|
assertNotNull(json_input);
|
||||||
fail("Excepected Exception.");
|
fail("Excepected Exception due to stack overflow.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user