Skip to content

Commit 931de7a

Browse files
committed
added test for setMaxRows()
1 parent e0bdc8b commit 931de7a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

jdbc-v2/src/test/java/com/clickhouse/jdbc/StatementTest.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -845,11 +845,16 @@ public void testMaxRowsWithOverflowMode() throws Exception {
845845
}
846846
assertEquals(count, 1000);
847847
}
848+
stmt.setMaxRows(0);
849+
try (ResultSet rs = stmt.executeQuery("SELECT * FROM generate_series(0, 1000)")) {
850+
int count = 0;
851+
while (rs.next()) {
852+
count++;
853+
}
854+
assertEquals(count, 1001);
855+
}
848856
}
849-
850857
}
851-
852-
853858
}
854859

855860
@Test(groups = {"integration"})

0 commit comments

Comments
 (0)