nizhikov commented on code in PR #11492:
URL: https://github.com/apache/ignite/pull/11492#discussion_r1751802725


##########
modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinResultSetSelfTest.java:
##########
@@ -599,6 +601,54 @@ public void testArray() throws Exception {
         assert cnt == 1;
     }
 
+    /**
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testBlob() throws Exception {
+        ResultSet rs = stmt.executeQuery(SQL);
+
+        int cnt = 0;
+
+        while (rs.next()) {
+            if (cnt == 0) {
+                Blob blob = rs.getBlob("blobVal");
+                Assert.assertArrayEquals(blob.getBytes(1, (int)blob.length()), 
new byte[] {1});
+
+                blob = rs.getBlob(16);
+                Assert.assertArrayEquals(blob.getBytes(1, (int)blob.length()), 
new byte[] {1});
+            }
+
+            cnt++;
+        }
+
+        assert cnt == 1;
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testClob() throws Exception {
+        ResultSet rs = stmt.executeQuery(SQL);
+
+        int cnt = 0;
+
+        while (rs.next()) {
+            if (cnt == 0) {
+                Clob clob = rs.getClob("clobVal");
+                Assert.assertEquals("str", clob.getSubString(1, 
(int)clob.length()));
+
+                clob = rs.getClob(17);
+                Assert.assertEquals("str", clob.getSubString(1, 
(int)clob.length()));
+            }
+
+            cnt++;
+        }
+
+        assert cnt == 1;

Review Comment:
   ```suggestion
           assertTrue(rs.next());
   
           Clob clob = rs.getClob("clobVal");
           Assert.assertEquals("str", clob.getSubString(1, (int)clob.length()));
   
           clob = rs.getClob(17);
           Assert.assertEquals("str", clob.getSubString(1, (int)clob.length()));
           assertFalse(rs.next());
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to