You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by am...@apache.org on 2023/01/26 14:46:29 UTC

[ignite-3] 02/03: Unmute tests. ignite-16905

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

amashenkov pushed a commit to branch ignite-18625
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit c10aa26423e518a120873652e345ba913157cb1d
Author: amashenkov <an...@gmail.com>
AuthorDate: Thu Jan 26 16:51:08 2023 +0300

    Unmute tests. ignite-16905
---
 .../ignite/jdbc/ItJdbcResultSetSelfTest.java       | 29 ++++++++--------------
 1 file changed, 10 insertions(+), 19 deletions(-)

diff --git a/modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcResultSetSelfTest.java b/modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcResultSetSelfTest.java
index ab8721be4f..ab959c95cc 100644
--- a/modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcResultSetSelfTest.java
+++ b/modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcResultSetSelfTest.java
@@ -52,7 +52,7 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
     private static final String STATIC_SQL =
             "SELECT 1::INTEGER as id, true as boolVal, 1::TINYINT as byteVal, 1::SMALLINT as shortVal, 1::INTEGER as intVal, 1::BIGINT "
                     + "as longVal, 1.0::FLOAT as floatVal, 1.0::DOUBLE as doubleVal, 1.0::DECIMAL as bigVal, "
-                    + "'1' as strVal, '1', '1901-02-01'::DATE as dateVal, '01:01:01'::TIME as timeVal, 1::TIMESTAMP as tsVal;";
+                    + "'1' as strVal, '1', '1901-02-01'::DATE as dateVal, '01:01:01'::TIME as timeVal, 0::TIMESTAMP as tsVal;";
 
     /** SQL query. */
     private static final String SQL_SINGLE_RES = "select id, boolVal, byteVal, shortVal, intVal, longVal, floatVal, "
@@ -486,7 +486,6 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
     }
 
     @Test
-    @Disabled("https://issues.apache.org/jira/browse/IGNITE-16905")
     public void testDate() throws Exception {
         ResultSet rs = stmt.executeQuery(STATIC_SQL);
 
@@ -520,7 +519,6 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
      */
     @SuppressWarnings("deprecation")
     @Test
-    @Disabled("https://issues.apache.org/jira/browse/IGNITE-16905")
     public void testTime() throws Exception {
         ResultSet rs = stmt.executeQuery(STATIC_SQL);
 
@@ -546,28 +544,21 @@ public class ItJdbcResultSetSelfTest extends AbstractJdbcSelfTest {
     }
 
     @Test
-    @Disabled("https://issues.apache.org/jira/browse/IGNITE-16905")
     public void testTimestamp() throws Exception {
         ResultSet rs = stmt.executeQuery(STATIC_SQL);
 
-        int cnt = 0;
+        assertTrue(rs.next());
 
-        while (rs.next()) {
-            if (cnt == 0) {
-                assertEquals(-10800000, rs.getTimestamp("tsVal").getTime());
-                assertEquals(new Date(new Timestamp(-10800000).getTime()), rs.getDate(14));
-                assertEquals(new Time(new Timestamp(-10800000).getTime()), rs.getTime(14));
-                assertEquals(new Timestamp(-10800000), rs.getTimestamp(14));
-
-                assertEquals(new Date(new Timestamp(-10800000).getTime()), rs.getObject(14, Date.class));
-                assertEquals(new Time(new Timestamp(-10800000).getTime()), rs.getObject(14, Time.class));
-                assertEquals(new Timestamp(-10800000), rs.getObject(14, Timestamp.class));
-            }
+        assertEquals(-10800000, rs.getTimestamp("tsVal").getTime());
+        assertEquals(new Date(new Timestamp(-10800000).getTime()), rs.getDate(14));
+        assertEquals(new Time(new Timestamp(-10800000).getTime()), rs.getTime(14));
+        assertEquals(new Timestamp(-10800000), rs.getTimestamp(14));
 
-            cnt++;
-        }
+        assertEquals(new Date(new Timestamp(-10800000).getTime()), rs.getObject(14, Date.class));
+        assertEquals(new Time(new Timestamp(-10800000).getTime()), rs.getObject(14, Time.class));
+        assertEquals(new Timestamp(-10800000), rs.getObject(14, Timestamp.class));
 
-        assertEquals(1, cnt);
+        assertFalse(rs.next());
     }
 
     @Test