This is an automated email from the ASF dual-hosted git repository.

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new aa55b977876 Add more test cases on JDBCStreamQueryResult (#33225)
aa55b977876 is described below

commit aa55b977876b1c0f6e4a3b0199a86c212a453a03
Author: Liang Zhang <[email protected]>
AuthorDate: Sat Oct 12 22:46:00 2024 +0800

    Add more test cases on JDBCStreamQueryResult (#33225)
---
 .../impl/driver/jdbc/type/stream/JDBCStreamQueryResultTest.java   | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/execute/result/query/impl/driver/jdbc/type/stream/JDBCStreamQueryResultTest.java
 
b/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/execute/result/query/impl/driver/jdbc/type/stream/JDBCStreamQueryResultTest.java
index d3bc835aea5..89d4ecd50f2 100644
--- 
a/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/execute/result/query/impl/driver/jdbc/type/stream/JDBCStreamQueryResultTest.java
+++ 
b/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/execute/result/query/impl/driver/jdbc/type/stream/JDBCStreamQueryResultTest.java
@@ -266,6 +266,14 @@ class JDBCStreamQueryResultTest {
         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);

Reply via email to