Skip to content

Commit

Permalink
Set "allow_experimental_object_type" only when testing JSON and skip …
Browse files Browse the repository at this point in the history
…on cloud
  • Loading branch information
jkaflik committed Jun 24, 2024
1 parent eceed44 commit fa77c06
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 38 deletions.
6 changes: 3 additions & 3 deletions tests/issues/1049_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ package issues

import (
"context"
"testing"

"github.com/ClickHouse/clickhouse-go/v2"
clickhouse_tests "github.com/ClickHouse/clickhouse-go/v2/tests"
"github.com/stretchr/testify/require"
"testing"
)

func Test1049(t *testing.T) {
var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
"allow_experimental_object_type": true,
"max_execution_time": 60,
}, nil, &clickhouse.Compression{
Method: clickhouse.CompressionLZ4,
})
Expand Down
4 changes: 3 additions & 1 deletion tests/issues/1072_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ package issues

import (
"context"
"testing"

"github.com/ClickHouse/clickhouse-go/v2"
clickhouse_tests "github.com/ClickHouse/clickhouse-go/v2/tests"
"github.com/stretchr/testify/require"
"testing"
)

func Test1072(t *testing.T) {
clickhouse_tests.SkipOnCloud(t, "The JSON data type is an obsolete feature on Cloud.")
var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
Expand Down
3 changes: 1 addition & 2 deletions tests/issues/1106_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import (
func Test1106(t *testing.T) {
var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
"allow_experimental_object_type": true,
"max_execution_time": 60,
}, nil, &clickhouse.Compression{
Method: clickhouse.CompressionLZ4,
})
Expand Down
1 change: 1 addition & 0 deletions tests/issues/1113_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
)

func Test1113(t *testing.T) {
clickhouse_tests.SkipOnCloud(t, "The JSON data type is an obsolete feature on Cloud.")
var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
Expand Down
1 change: 1 addition & 0 deletions tests/issues/1119_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
)

func Test1119(t *testing.T) {
clickhouse_tests.SkipOnCloud(t, "The JSON data type is an obsolete feature on Cloud.")
var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
Expand Down
3 changes: 1 addition & 2 deletions tests/issues/1128_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ type Test struct {
func Test1128(t *testing.T) {
var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
"allow_experimental_object_type": true,
"max_execution_time": 60,
}, nil, &clickhouse.Compression{
Method: clickhouse.CompressionLZ4,
})
Expand Down
18 changes: 7 additions & 11 deletions tests/issues/1164_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ package issues
import (
"context"
"fmt"
"testing"

"github.com/ClickHouse/clickhouse-go/v2"
"github.com/ClickHouse/clickhouse-go/v2/lib/column"
clickhouse_tests "github.com/ClickHouse/clickhouse-go/v2/tests"
"github.com/stretchr/testify/require"
"testing"
)

func TestIssue1164(t *testing.T) {
var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
"allow_experimental_object_type": true,
"max_execution_time": 60,
}, nil, &clickhouse.Compression{
Method: clickhouse.CompressionLZ4,
})
Expand Down Expand Up @@ -57,8 +57,7 @@ func BenchmarkIssue1164(b *testing.B) {
b.Run("default-10000", func(b *testing.B) {
var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
"allow_experimental_object_type": true,
"max_execution_time": 60,
}, nil, &clickhouse.Compression{
Method: clickhouse.CompressionLZ4,
})
Expand Down Expand Up @@ -90,8 +89,7 @@ func BenchmarkIssue1164(b *testing.B) {
b.Run("preAlloc-10000", func(b *testing.B) {
var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
"allow_experimental_object_type": true,
"max_execution_time": 60,
}, nil, &clickhouse.Compression{
Method: clickhouse.CompressionLZ4,
})
Expand Down Expand Up @@ -125,8 +123,7 @@ func BenchmarkIssue1164(b *testing.B) {
b.Run("default-50000", func(b *testing.B) {
var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
"allow_experimental_object_type": true,
"max_execution_time": 60,
}, nil, &clickhouse.Compression{
Method: clickhouse.CompressionLZ4,
})
Expand Down Expand Up @@ -158,8 +155,7 @@ func BenchmarkIssue1164(b *testing.B) {
b.Run("preAlloc-50000", func(b *testing.B) {
var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
"allow_experimental_object_type": true,
"max_execution_time": 60,
}, nil, &clickhouse.Compression{
Method: clickhouse.CompressionLZ4,
})
Expand Down
3 changes: 1 addition & 2 deletions tests/issues/1169_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import (
func Test1169(t *testing.T) {
var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
"allow_experimental_object_type": true,
"max_execution_time": 60,
}, nil, &clickhouse.Compression{
Method: clickhouse.CompressionLZ4,
})
Expand Down
3 changes: 1 addition & 2 deletions tests/issues/1200_pr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import (
func Test1200(t *testing.T) {
var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
"allow_experimental_object_type": true,
"max_execution_time": 60,
}, nil, &clickhouse.Compression{
Method: clickhouse.CompressionLZ4,
})
Expand Down
3 changes: 1 addition & 2 deletions tests/issues/1216_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import (
func Test1216(t *testing.T) {
var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
"allow_experimental_object_type": true,
"max_execution_time": 60,
}, nil, &clickhouse.Compression{
Method: clickhouse.CompressionLZ4,
})
Expand Down
3 changes: 1 addition & 2 deletions tests/issues/1229_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ func Test1229(t *testing.T) {

var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
"allow_experimental_object_type": true,
"max_execution_time": 60,
}, nil, &clickhouse.Compression{
Method: clickhouse.CompressionLZ4,
})
Expand Down
3 changes: 1 addition & 2 deletions tests/issues/1247_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import (
func Test1247(t *testing.T) {
var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
"allow_experimental_object_type": true,
"max_execution_time": 60,
}, nil, &clickhouse.Compression{
Method: clickhouse.CompressionLZ4,
})
Expand Down
8 changes: 4 additions & 4 deletions tests/issues/1271_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package issues
import (
"context"
"fmt"
"github.com/ClickHouse/clickhouse-go/v2/lib/driver"
"github.com/google/uuid"
"math/rand"
"runtime"
"strings"
"testing"
"time"

"github.com/ClickHouse/clickhouse-go/v2/lib/driver"
"github.com/google/uuid"

"github.com/ClickHouse/clickhouse-go/v2"
clickhouse_tests "github.com/ClickHouse/clickhouse-go/v2/tests"
"github.com/stretchr/testify/require"
Expand All @@ -20,8 +21,7 @@ import (
func Test1271(t *testing.T) {
var (
conn, err = clickhouse_tests.GetConnection("issues", clickhouse.Settings{
"max_execution_time": 60,
"allow_experimental_object_type": true,
"max_execution_time": 60,
}, nil, &clickhouse.Compression{
Method: clickhouse.CompressionLZ4,
})
Expand Down
3 changes: 1 addition & 2 deletions tests/issues/1280_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import (
func Test1280(t *testing.T) {
var (
conn, err = clickhouse_tests.GetConnection(testSet, clickhouse.Settings{
"max_execution_time": 60,
"allow_experimental_object_type": true,
"max_execution_time": 60,
}, nil, &clickhouse.Compression{
Method: clickhouse.CompressionLZ4,
})
Expand Down
11 changes: 8 additions & 3 deletions tests/std/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ package std
import (
"crypto/tls"
"fmt"
"strconv"
"testing"
"time"

"github.com/ClickHouse/clickhouse-go/v2"
clickhouse_tests "github.com/ClickHouse/clickhouse-go/v2/tests"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"strconv"
"testing"
"time"
)

type Releases struct {
Expand Down Expand Up @@ -63,6 +64,8 @@ type GithubEvent struct {
var testDate, _ = time.Parse("2006-01-02 15:04:05.999999999 -0700 MST", "2022-05-25 17:20:57 +0100 WEST")

func TestStdJson(t *testing.T) {
clickhouse_tests.SkipOnCloud(t, "The JSON data type is an obsolete feature on Cloud.")

useSSL, err := strconv.ParseBool(clickhouse_tests.GetEnv("CLICKHOUSE_USE_SSL", "false"))
require.NoError(t, err)
var tlsConfig *tls.Config
Expand Down Expand Up @@ -132,6 +135,8 @@ func TestStdJson(t *testing.T) {

// https://github.com/ClickHouse/clickhouse-go/issues/645
func TestStdJsonWithMap(t *testing.T) {
clickhouse_tests.SkipOnCloud(t, "The JSON data type is an obsolete feature on Cloud.")

useSSL, err := strconv.ParseBool(clickhouse_tests.GetEnv("CLICKHOUSE_USE_SSL", "false"))
require.NoError(t, err)
var tlsConfig *tls.Config
Expand Down

0 comments on commit fa77c06

Please sign in to comment.