File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
c/src/test/java/org/apache/arrow/c Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public void testException() throws IOException {
6666 root .setRowCount (4 );
6767 batches .add (unloader .getRecordBatch ());
6868
69- final String exceptionMessage = "Error occurred while getting next schema root. \n \t at org.apache.arrow.adapter.jdbc.ArrowVectorIterator.next(ArrowVectorIterator.java:205) \n \t at com.oceanbase.external.jdbc.JdbcScanner.loadNextBatch(JdbcScanner.java:73) \n \t at org.apache.arrow.c.ArrayStreamExporter$ExportedArrayStreamPrivateData.getNext(ArrayStreamExporter.java:72) \n Caused by: java.lang.RuntimeException: Error occurred while consuming data. \n \t at org.apache.arrow.adapter.jdbc.ArrowVectorIterator.consumeData(ArrowVectorIterator.java:127) \n \t at org.apache.arrow.adapter.jdbc.ArrowVectorIterator.load(ArrowVectorIterator.java:178) \n \t at org.apache.arrow.adapter.jdbc.ArrowVectorIterator.next(ArrowVectorIterator.java:198) \n \t ... 2 more \n Caused by: java.lang.OutOfMemoryError: Java heap space \n " ;
69+ final String exceptionMessage = "This is a message for testing exception. " ;
7070
7171 RuntimeException exToThrow = new RuntimeException (exceptionMessage );
7272 batches .add (exToThrow );
@@ -93,7 +93,8 @@ public void testException() throws IOException {
9393 } catch (Exception e ) {
9494 assertThat (exceptionThrowed ).isEqualTo (null );
9595 final String eMessage = e .getMessage ();
96- assertThat (eMessage .length ()).isGreaterThan (expectExceptionMessage .length () + 1 ); // 1 for '}'
96+ // 1 for '}', ref to CDataJniException
97+ assertThat (eMessage .length ()).isGreaterThan (expectExceptionMessage .length () + 1 );
9798 assertThat (eMessage .substring (eMessage .length () - expectExceptionMessage .length () - 1 , eMessage .length () - 1 ))
9899 .isEqualTo (expectExceptionMessage );
99100 exceptionThrowed = e ;
You can’t perform that action at this time.
0 commit comments