Skip to content

Commit

Permalink
[misc] test addition to ensure streaming forcing while executing othe…
Browse files Browse the repository at this point in the history
…r command
  • Loading branch information
rusher committed Mar 7, 2022
1 parent 20c82c7 commit 98440d3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/java/org/mariadb/jdbc/integration/StatementTest.java
Expand Up @@ -557,6 +557,7 @@ public void cancel() throws Exception {
public void fetch() throws SQLException {
Assumptions.assumeTrue(isMariaDBServer());
Statement stmt = sharedConn.createStatement();
Statement stmt2 = sharedConn.createStatement();
Common.assertThrowsContains(
SQLException.class, () -> stmt.setFetchSize(-10), "invalid fetch size");

Expand All @@ -570,6 +571,15 @@ public void fetch() throws SQLException {
}

assertFalse(rs.next());

rs = stmt.executeQuery("select * FROM seq_1_to_100");
ResultSet rs2 = stmt2.executeQuery("SELECT 200");
for (int i = 1; i <= 100; i++) {
assertTrue(rs.next());
assertEquals(i, rs.getInt(1));
}
assertTrue(rs2.next());
assertEquals(200, rs2.getInt(1));
}

@Test
Expand Down

0 comments on commit 98440d3

Please sign in to comment.