zstan commented on code in PR #2906:
URL: https://github.com/apache/ignite-3/pull/2906#discussion_r1421758663


##########
modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcMultiStatementSelfTest.java:
##########
@@ -52,48 +54,229 @@ public void setupTables() throws Exception {
                 + "(4, 19, 'Nick');");
     }
 
-    /**
-     * Execute sql script using thin driver.
-     */
-    private void execute(String sql) throws Exception {
-        stmt.executeUpdate(sql);
+    @AfterEach
+    void tearDown() throws Exception {
+        // only connection context.
+        assertEquals(1, openCursorsRegistered());
     }
 
-    /**
-     * Assert that script containing both h2 and non h2 (native) sql 
statements is handled correctly.
-     */
     @Test
-    public void testMixedCommands() throws Exception {
-        execute("CREATE TABLE public.transactions (pk INT, id INT, k VARCHAR, 
v VARCHAR, PRIMARY KEY (pk, id)); "
-                + "CREATE INDEX transactions_id_k_v ON public.transactions 
(id, k, v) INLINE_SIZE 150; "
-                + "INSERT INTO public.transactions VALUES (1,2,'some', 'word') 
; "
-                + "CREATE INDEX transactions_k_v_id ON public.transactions (k, 
v, id) INLINE_SIZE 150; "
-                + "CREATE INDEX transactions_pk_id ON public.transactions (pk, 
id) INLINE_SIZE 20;");
+    public void testSimpleQueryExecute() throws Exception {
+        int initial = openCursorsRegistered();
+
+        boolean res = stmt.execute("INSERT INTO TEST_TX VALUES (5, 5, '5');");
+        assertEquals(false, res);
+        stmt.getResultSet();
+        stmt.getMoreResults();

Review Comment:
   I understand you, but this case is not for check intermediate statement 
commands but about correct results after multiple calls, but ok, i fix it, it 
makes no harm.



-- 
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