Skip to content

Commit

Permalink
chore: fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cisse21 committed Nov 17, 2023
1 parent 03b8cbb commit 9e45f29
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions warehouse/integrations/clickhouse/clickhouse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"testing"
"time"

clickhousestd "github.com/ClickHouse/clickhouse-go"
"github.com/golang/mock/gomock"
"github.com/google/uuid"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -161,7 +162,7 @@ func TestIntegration(t *testing.T) {
destinationID string
warehouseEvents testhelper.EventsCountMap
warehouseModifiedEvents testhelper.EventsCountMap
clusterSetup func(t testing.TB)
clusterSetup func(t *testing.T)
db *sql.DB
stagingFilePrefix string
}{
Expand Down Expand Up @@ -189,7 +190,7 @@ func TestIntegration(t *testing.T) {
"aliases": 8,
"groups": 8,
},
clusterSetup: func(t testing.TB) {
clusterSetup: func(t *testing.T) {
t.Helper()
initializeClickhouseClusterMode(t, dbs[1:], tables)
},
Expand Down Expand Up @@ -1028,7 +1029,7 @@ func connectClickhouseDB(ctx context.Context, t testing.TB, dsn string) *sql.DB
return db
}

func initializeClickhouseClusterMode(t testing.TB, clusterDBs []*sql.DB, tables []string) {
func initializeClickhouseClusterMode(t *testing.T, clusterDBs []*sql.DB, tables []string) {
t.Helper()

type ColumnInfoT struct {
Expand Down Expand Up @@ -1163,7 +1164,9 @@ func initializeClickhouseClusterMode(t testing.TB, clusterDBs []*sql.DB, tables
}

t.Run("Create Drop Create", func(t *testing.T) {
clusterDB := connectClickhouseDB(ctx, t, fmt.Sprintf("tcp://%s:%d?compress=false&database=%s&password=%s&secure=false&skip_verify=true&username=%s",
clusterPort1, err := kithelper.GetFreePort()
require.NoError(t, err)
clusterDB := connectClickhouseDB(context.Background(), t, fmt.Sprintf("tcp://%s:%d?compress=false&database=%s&password=%s&secure=false&skip_verify=true&username=%s",
"localhost", clusterPort1, "rudderdb", "rudder-password", "rudder",
))

Expand Down

0 comments on commit 9e45f29

Please sign in to comment.