Skip to content

Apache Lucene open-source search software

tests: ignore expected exceptions

Yonik Seeley9a77cfbba0b0
diff --git a/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java b/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java
index 58eb1364cae..36ec068bddb 100644
--- a/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java
@@ -44,7 +44,7 @@ public class JsonLoaderTest extends SolrTestCaseJ4 {
initCore("solrconfig.xml","schema.xml");
}
- static String input = ("{\n" +
+ static String input = json("{\n" +
"\n" +
"'add': {\n" +
" 'doc': {\n" +
@@ -82,7 +82,7 @@ public class JsonLoaderTest extends SolrTestCaseJ4 {
"'rollback': {}\n" +
"\n" +
"}\n" +
- "").replace('\'', '"');
+ "");
public void testParsing() throws Exception
@@ -395,6 +395,9 @@ public class JsonLoaderTest extends SolrTestCaseJ4 {
public void testAddBigIntegerValueToTrieField() throws Exception {
// Adding a BigInteger to a long field should fail
// BigInteger.longValue() returns only the low-order 64 bits.
+
+ ignoreException("big_integer_t");
+
try {
updateJ(json( "[{'id':'1','big_integer_tl':12345678901234567890}]" ), null);
fail("A BigInteger value should overflow a long field");
@@ -415,6 +418,7 @@ public class JsonLoaderTest extends SolrTestCaseJ4 {
}
}
+ unIgnoreException("big_integer_t");
}
@Test