Search in sources :

Example 1 with ArithmeticException

use of java.lang.ArithmeticException in project lucene-solr by apache.

the class TestSolrQueryResponse method testException.

@Test
public void testException() throws Exception {
    final SolrQueryResponse response = new SolrQueryResponse();
    assertEquals("exception initial value", null, response.getException());
    final Exception newValue = (random().nextBoolean() ? (random().nextBoolean() ? new ArithmeticException() : new IOException()) : null);
    response.setException(newValue);
    assertEquals("exception new value", newValue, response.getException());
}
Also used : SolrQueryResponse(org.apache.solr.response.SolrQueryResponse) ArithmeticException(java.lang.ArithmeticException) IOException(java.io.IOException) IOException(java.io.IOException) ArithmeticException(java.lang.ArithmeticException) Test(org.junit.Test)

Aggregations

IOException (java.io.IOException)1 ArithmeticException (java.lang.ArithmeticException)1 SolrQueryResponse (org.apache.solr.response.SolrQueryResponse)1 Test (org.junit.Test)1