From 332342744b2f7e77ac78ac961628c5a065d2ca74 Mon Sep 17 00:00:00 2001 From: Akash Chetty Date: Tue, 30 May 2023 15:06:41 +0530 Subject: [PATCH] chore: cleanup for integration tests for warehouse (#3412) --- .../azure-synapse/azure_synapse_test.go | 4 ---- .../integrations/bigquery/bigquery_test.go | 4 ---- .../clickhouse/clickhouse_test.go | 20 ------------------- .../integrations/datalake/datalake_test.go | 4 ---- .../deltalake-native/deltalake_test.go | 4 ---- warehouse/integrations/mssql/mssql_test.go | 4 ---- .../integrations/postgres/postgres_test.go | 4 ---- .../integrations/redshift/redshift_test.go | 4 ---- .../integrations/snowflake/snowflake_test.go | 4 ---- 9 files changed, 52 deletions(-) diff --git a/warehouse/integrations/azure-synapse/azure_synapse_test.go b/warehouse/integrations/azure-synapse/azure_synapse_test.go index 98f3ec5900..acefd99d3d 100644 --- a/warehouse/integrations/azure-synapse/azure_synapse_test.go +++ b/warehouse/integrations/azure-synapse/azure_synapse_test.go @@ -33,10 +33,6 @@ func TestIntegration(t *testing.T) { } c := testcompose.New(t, compose.FilePaths([]string{"testdata/docker-compose.yml", "../testdata/docker-compose.jobsdb.yml", "../testdata/docker-compose.minio.yml"})) - - t.Cleanup(func() { - c.Stop(context.Background()) - }) c.Start(context.Background()) misc.Init() diff --git a/warehouse/integrations/bigquery/bigquery_test.go b/warehouse/integrations/bigquery/bigquery_test.go index 85e934fa57..9f446aa30f 100644 --- a/warehouse/integrations/bigquery/bigquery_test.go +++ b/warehouse/integrations/bigquery/bigquery_test.go @@ -50,10 +50,6 @@ func TestIntegration(t *testing.T) { } c := testcompose.New(t, compose.FilePaths([]string{"../testdata/docker-compose.jobsdb.yml"})) - - t.Cleanup(func() { - c.Stop(context.Background()) - }) c.Start(context.Background()) misc.Init() diff --git a/warehouse/integrations/clickhouse/clickhouse_test.go b/warehouse/integrations/clickhouse/clickhouse_test.go index 53a7718dd8..232ce5a2d9 100644 --- a/warehouse/integrations/clickhouse/clickhouse_test.go +++ b/warehouse/integrations/clickhouse/clickhouse_test.go @@ -46,10 +46,6 @@ func TestIntegration(t *testing.T) { } c := testcompose.New(t, compose.FilePaths([]string{"testdata/docker-compose.clickhouse.yml", "testdata/docker-compose.clickhouse-cluster.yml", "../testdata/docker-compose.jobsdb.yml", "../testdata/docker-compose.minio.yml"})) - - t.Cleanup(func() { - c.Stop(context.Background()) - }) c.Start(context.Background()) misc.Init() @@ -406,10 +402,6 @@ func (m *mockUploader) GetLoadFilesMetadata(context.Context, warehouseutils.GetL func TestClickhouse_LoadTableRoundTrip(t *testing.T) { c := testcompose.New(t, compose.FilePaths([]string{"testdata/docker-compose.clickhouse.yml", "../testdata/docker-compose.minio.yml"})) - - t.Cleanup(func() { - c.Stop(context.Background()) - }) c.Start(context.Background()) misc.Init() @@ -676,10 +668,6 @@ func TestClickhouse_LoadTableRoundTrip(t *testing.T) { func TestClickhouse_TestConnection(t *testing.T) { c := testcompose.New(t, compose.FilePaths([]string{"testdata/docker-compose.clickhouse.yml"})) - - t.Cleanup(func() { - c.Stop(context.Background()) - }) c.Start(context.Background()) misc.Init() @@ -782,10 +770,6 @@ func TestClickhouse_TestConnection(t *testing.T) { func TestClickhouse_LoadTestTable(t *testing.T) { c := testcompose.New(t, compose.FilePaths([]string{"testdata/docker-compose.clickhouse.yml"})) - - t.Cleanup(func() { - c.Stop(context.Background()) - }) c.Start(context.Background()) misc.Init() @@ -891,10 +875,6 @@ func TestClickhouse_LoadTestTable(t *testing.T) { func TestClickhouse_FetchSchema(t *testing.T) { c := testcompose.New(t, compose.FilePaths([]string{"testdata/docker-compose.clickhouse.yml"})) - - t.Cleanup(func() { - c.Stop(context.Background()) - }) c.Start(context.Background()) misc.Init() diff --git a/warehouse/integrations/datalake/datalake_test.go b/warehouse/integrations/datalake/datalake_test.go index ed4bb598a2..baafdfc220 100644 --- a/warehouse/integrations/datalake/datalake_test.go +++ b/warehouse/integrations/datalake/datalake_test.go @@ -65,10 +65,6 @@ func TestIntegration(t *testing.T) { } c := testcompose.New(t, compose.FilePaths([]string{"testdata/docker-compose.yml", "../testdata/docker-compose.jobsdb.yml", "../testdata/docker-compose.minio.yml"})) - - t.Cleanup(func() { - c.Stop(context.Background()) - }) c.Start(context.Background()) misc.Init() diff --git a/warehouse/integrations/deltalake-native/deltalake_test.go b/warehouse/integrations/deltalake-native/deltalake_test.go index ef361a1d58..0b54038c41 100644 --- a/warehouse/integrations/deltalake-native/deltalake_test.go +++ b/warehouse/integrations/deltalake-native/deltalake_test.go @@ -76,10 +76,6 @@ func TestIntegration(t *testing.T) { } c := testcompose.New(t, compose.FilePaths([]string{"testdata/docker-compose.yml", "../testdata/docker-compose.jobsdb.yml"})) - - t.Cleanup(func() { - c.Stop(context.Background()) - }) c.Start(context.Background()) misc.Init() diff --git a/warehouse/integrations/mssql/mssql_test.go b/warehouse/integrations/mssql/mssql_test.go index d4b10dda27..13767fa154 100644 --- a/warehouse/integrations/mssql/mssql_test.go +++ b/warehouse/integrations/mssql/mssql_test.go @@ -34,10 +34,6 @@ func TestIntegration(t *testing.T) { } c := testcompose.New(t, compose.FilePaths([]string{"testdata/docker-compose.yml", "../testdata/docker-compose.jobsdb.yml", "../testdata/docker-compose.minio.yml"})) - - t.Cleanup(func() { - c.Stop(context.Background()) - }) c.Start(context.Background()) misc.Init() diff --git a/warehouse/integrations/postgres/postgres_test.go b/warehouse/integrations/postgres/postgres_test.go index 1cd0e659e7..9a4502cc23 100644 --- a/warehouse/integrations/postgres/postgres_test.go +++ b/warehouse/integrations/postgres/postgres_test.go @@ -40,10 +40,6 @@ func TestIntegration(t *testing.T) { } c := testcompose.New(t, compose.FilePaths([]string{"testdata/docker-compose.yml", "../testdata/docker-compose.jobsdb.yml", "../testdata/docker-compose.minio.yml"})) - - t.Cleanup(func() { - c.Stop(context.Background()) - }) c.Start(context.Background()) misc.Init() diff --git a/warehouse/integrations/redshift/redshift_test.go b/warehouse/integrations/redshift/redshift_test.go index dbda47dcaf..10db37ce35 100644 --- a/warehouse/integrations/redshift/redshift_test.go +++ b/warehouse/integrations/redshift/redshift_test.go @@ -85,10 +85,6 @@ func TestIntegration(t *testing.T) { } c := testcompose.New(t, compose.FilePaths([]string{"../testdata/docker-compose.jobsdb.yml"})) - - t.Cleanup(func() { - c.Stop(context.Background()) - }) c.Start(context.Background()) misc.Init() diff --git a/warehouse/integrations/snowflake/snowflake_test.go b/warehouse/integrations/snowflake/snowflake_test.go index de7d2a0231..9636de0921 100644 --- a/warehouse/integrations/snowflake/snowflake_test.go +++ b/warehouse/integrations/snowflake/snowflake_test.go @@ -90,10 +90,6 @@ func TestIntegration(t *testing.T) { } c := testcompose.New(t, compose.FilePaths([]string{"../testdata/docker-compose.jobsdb.yml"})) - - t.Cleanup(func() { - c.Stop(context.Background()) - }) c.Start(context.Background()) misc.Init()