Skip to content

Commit 8571e3d

Browse files
committed
fixed a version check a bit
1 parent 5137f35 commit 8571e3d

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

client-v2/src/test/java/com/clickhouse/client/datatypes/DataTypeTests.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,9 @@ public void testVariantWithTuple() throws Exception {
414414

415415
@Test(groups = {"integration"})
416416
public void testVariantWithTime64Types() throws Exception {
417+
if (isVersionMatch("(,25.5]")) {
418+
return; // time64 was introduced in 25.6
419+
}
417420
testVariantWith("Time", new String[]{"field Variant(Time, String)"},
418421
new Object[]{
419422
"30:33:30",
@@ -633,6 +636,10 @@ public void testDynamicWithMaps() throws Exception {
633636

634637
@Test(groups = {"integration"})
635638
public void testDynamicWithTime64Types() throws Exception {
639+
if (isVersionMatch("(,25.5]")) {
640+
return; // time64 was introduced in 25.6
641+
}
642+
636643
long _999_hours = TimeUnit.HOURS.toSeconds(999);
637644
testDynamicWith("Time",
638645
new Object[]{
@@ -686,10 +693,11 @@ public void testAllDataTypesKnown() {
686693

687694
@Test(groups = {"integration"})
688695
public void testTimeDataType() throws Exception {
689-
if (isVersionMatch("(,25.4]")) {
690-
return;
696+
if (isVersionMatch("(,25.5]")) {
697+
return; // time64 was introduced in 25.6
691698
}
692699

700+
693701
String table = "test_time_type";
694702
client.execute("DROP TABLE IF EXISTS " + table).get();
695703
client.execute(tableDefinition(table, "o_num UInt32", "time Time"), (CommandSettings) new CommandSettings().serverSetting("allow_experimental_time_time64_type", "1")).get();
@@ -724,8 +732,8 @@ record = records.get(3);
724732

725733
@Test(groups = {"integration"})
726734
public void testTime64() throws Exception {
727-
if (isVersionMatch("(,25.4]")) {
728-
return;
735+
if (isVersionMatch("(,25.5]")) {
736+
return; // time64 was introduced in 25.6
729737
}
730738

731739
String table = "test_time64_type";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ public void testDateTypes() throws SQLException {
555555

556556
@Test(groups = { "integration" })
557557
public void testTimeTypes() throws SQLException {
558-
if (ClickHouseVersion.of(getServerVersion()).check("(,25.6]")) {
558+
if (ClickHouseVersion.of(getServerVersion()).check("(,25.5]")) {
559559
return; // Time64 introduced in 25.6
560560
}
561561
Properties createProperties = new Properties();

0 commit comments

Comments
 (0)