Skip to content

Commit 0d3e010

Browse files
committed
added JDBC tests
1 parent 218cf1f commit 0d3e010

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

jdbc-v2/src/test/java/com/clickhouse/jdbc/DataTypeTests.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import java.time.OffsetDateTime;
2929
import java.time.ZoneId;
3030
import java.time.ZonedDateTime;
31-
import java.time.format.DateTimeFormatter;
3231
import java.util.GregorianCalendar;
3332
import java.util.HashMap;
3433
import java.util.Map;
@@ -532,7 +531,7 @@ public void testIpAddressTypes() throws SQLException, UnknownHostException {
532531
InetAddress ipv4AsIpv6 = Inet4Address.getByName("90.176.75.97");
533532

534533
try (Connection conn = getConnection()) {
535-
try (PreparedStatement stmt = conn.prepareStatement("INSERT INTO test_ips VALUES ( 1, ?, ?, ? )")) {
534+
try (PreparedStatement stmt = conn.prepareStatement("INSERT INTO test_ips VALUES ( 1, ?, ?, ?, ? )")) {
536535
stmt.setObject(1, ipv4AddressByIp);
537536
stmt.setObject(2, ipv4AddressByName);
538537
stmt.setObject(3, ipv6Address);
@@ -551,8 +550,7 @@ public void testIpAddressTypes() throws SQLException, UnknownHostException {
551550
assertEquals(rs.getObject("ipv4_name"), ipv4AddressByName);
552551
assertEquals(rs.getObject("ipv6"), ipv6Address);
553552
assertEquals(rs.getString("ipv6"), ipv6Address.toString());
554-
String value = rs.getObject("ipv4_as_ipv6").toString();
555-
System.out.println("ip: " + value);
553+
assertEquals(rs.getObject("ipv4_as_ipv6"), ipv4AsIpv6);
556554
assertFalse(rs.next());
557555
}
558556
}

0 commit comments

Comments
 (0)