Skip to content

Commit 2555f87

Browse files
committed
fix unknown setting in tests
1 parent 3963b88 commit 2555f87

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

tests/dynamic_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ func setupDynamicTest(t *testing.T, protocol clickhouse.Protocol) driver.Conn {
3636
conn, err := GetNativeConnection(t, protocol, clickhouse.Settings{
3737
"max_execution_time": 60,
3838
"allow_experimental_dynamic_type": true,
39-
"output_format_native_use_flattened_dynamic_and_json_serialization": true,
4039
}, nil, &clickhouse.Compression{
4140
Method: clickhouse.CompressionLZ4,
4241
})

tests/json_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,10 @@ func setupJSONTest(t *testing.T, protocol clickhouse.Protocol) driver.Conn {
3131
SkipOnCloud(t, "cannot modify JSON settings on cloud")
3232

3333
conn, err := GetNativeConnection(t, protocol, clickhouse.Settings{
34-
"max_execution_time": 60,
35-
"allow_experimental_variant_type": true,
36-
"allow_experimental_dynamic_type": true,
37-
"allow_experimental_json_type": true,
38-
"output_format_native_use_flattened_dynamic_and_json_serialization": true,
34+
"max_execution_time": 60,
35+
"allow_experimental_variant_type": true,
36+
"allow_experimental_dynamic_type": true,
37+
"allow_experimental_json_type": true,
3938
}, nil, &clickhouse.Compression{
4039
Method: clickhouse.CompressionLZ4,
4140
})

tests/utils.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,13 @@ func getConnection(env ClickHouseTestEnvironment, database string, settings clic
447447
}, env.Version) {
448448
settings["database_replicated_enforce_synchronous_settings"] = "1"
449449
}
450+
if proto.CheckMinVersion(proto.Version{
451+
Major: 25,
452+
Minor: 6,
453+
Patch: 0,
454+
}, env.Version) {
455+
settings["output_format_native_use_flattened_dynamic_and_json_serialization"] = "1"
456+
}
450457
settings["insert_quorum"], err = strconv.Atoi(GetEnv("CLICKHOUSE_QUORUM_INSERT", "1"))
451458
settings["insert_quorum_parallel"] = 0
452459
settings["select_sequential_consistency"] = 1
@@ -495,6 +502,13 @@ func getHTTPConnection(env ClickHouseTestEnvironment, t *testing.T, database str
495502
}, env.Version) {
496503
settings["database_replicated_enforce_synchronous_settings"] = "1"
497504
}
505+
if proto.CheckMinVersion(proto.Version{
506+
Major: 25,
507+
Minor: 6,
508+
Patch: 0,
509+
}, env.Version) {
510+
settings["output_format_native_use_flattened_dynamic_and_json_serialization"] = "1"
511+
}
498512
settings["insert_quorum"], err = strconv.Atoi(GetEnv("CLICKHOUSE_QUORUM_INSERT", "1"))
499513
settings["insert_quorum_parallel"] = 0
500514
settings["select_sequential_consistency"] = 1

0 commit comments

Comments
 (0)