Skip to content

Commit

Permalink
Add more test cases on JDBCStreamQueryResult (apache#33225)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu authored Oct 12, 2024
1 parent 26c0cad commit aa55b97
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,14 @@ void assertGetResultSet() throws SQLException {
assertTrue(actual.wasNull());
}

@Test
void assertClose() throws SQLException {
ResultSet resultSet = getResultSet();
JDBCStreamQueryResult queryResult = new JDBCStreamQueryResult(resultSet);
queryResult.close();
verify(resultSet).close();
}

private ResultSet getResultSet() throws SQLException {
ResultSet result = mock(ResultSet.class);
when(result.next()).thenReturn(true).thenReturn(false);
Expand Down

0 comments on commit aa55b97

Please sign in to comment.