@@ -302,14 +302,14 @@ public void testShouldCancelQueryUponCancelAfterQueryingResultSet() throws SQLEx
302302 @ Test
303303 public void testShouldInterruptFlightStreamsIfQueryIsCancelledMidQuerying ()
304304 throws SQLException , InterruptedException {
305- final String query = CoreMockedSqlProducers .LEGACY_REGULAR_SQL_CMD ;
306305 try (final Statement statement = connection .createStatement ()) {
307306 final CountDownLatch latch = new CountDownLatch (1 );
308307 final Set <Exception > exceptions = synchronizedSet (new HashSet <>(1 ));
309308 final Thread thread =
310309 new Thread (
311310 () -> {
312- try (final ResultSet resultSet = statement .executeQuery (query )) {
311+ try (final ResultSet resultSet =
312+ statement .executeQuery (CoreMockedSqlProducers .LEGACY_REGULAR_SQL_CMD )) {
313313 final int cachedColumnCount = resultSet .getMetaData ().getColumnCount ();
314314 Thread .sleep (300 );
315315 while (resultSet .next ()) {
@@ -332,14 +332,7 @@ public void testShouldInterruptFlightStreamsIfQueryIsCancelledMidQuerying()
332332 .reduce (StringBuilder ::append )
333333 .orElseThrow (IllegalArgumentException ::new )
334334 .toString (),
335- anyOf (
336- is ("Statement canceled" ),
337- allOf (
338- containsString (format ("Error while executing SQL \" %s\" " , query )),
339- anyOf (
340- containsString ("Query canceled" ),
341- containsString ("CANCELLED" ),
342- containsString ("Cancelling" )))));
335+ is ("Statement canceled" ));
343336 }
344337 }
345338
0 commit comments