Skip to content

Commit c6c5a88

Browse files
authored
Added t.Parallel() to acceptance tests (#1427)
1 parent f1e6c93 commit c6c5a88

33 files changed

+47
-12
lines changed

access/acceptance/sql_permissions_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func TestAccTableACL(t *testing.T) {
2020
if cloudEnv == "" {
2121
t.Skip("Acceptance tests skipped unless env 'CLOUD_ENV' is set")
2222
}
23-
23+
t.Parallel()
2424
client := common.CommonEnvironmentClient()
2525
client.WithCommandExecutor(func(ctx context.Context,
2626
dc *common.DatabricksClient) common.CommandExecutor {

access/resource_ip_access_list_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ func TestAccIPACL(t *testing.T) {
3030
if cloud == "" {
3131
t.Skip("Acceptance tests skipped unless env 'CLOUD_ENV' is set")
3232
}
33+
t.Parallel()
3334
client := common.NewClientFromEnvironment()
3435
ctx := context.Background()
3536
ipAccessListsAPI := NewIPAccessListsAPI(ctx, client)

clusters/acceptance/cluster_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
)
88

99
func TestAccClusterResource_CreateClusterWithLibraries(t *testing.T) {
10+
t.Parallel()
1011
acceptance.Test(t, []acceptance.Step{
1112
{
1213
Template: `
@@ -54,6 +55,7 @@ func TestAccClusterResource_CreateClusterWithLibraries(t *testing.T) {
5455
}
5556

5657
func TestAccClusterResource_CreateSingleNodeCluster(t *testing.T) {
58+
t.Parallel()
5759
acceptance.Test(t, []acceptance.Step{
5860
{
5961
Template: `

clusters/acceptance/clusters_api_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func TestAccListClustersIntegration(t *testing.T) {
1919
if cloudEnv == "" {
2020
t.Skip("Acceptance tests skipped unless env 'CLOUD_ENV' is set")
2121
}
22-
22+
t.Parallel()
2323
client := common.CommonEnvironmentClient()
2424
ctx := context.Background()
2525
clustersAPI := clusters.NewClustersAPI(ctx, client)

commands/acceptance/commands_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ func TestAccContext(t *testing.T) {
1717
if cloud == "" {
1818
t.Skip("Acceptance tests skipped unless env 'CLOUD_ENV' is set")
1919
}
20+
t.Parallel()
2021
client := common.CommonEnvironmentClient()
2122
clusterInfo := compute.NewTinyClusterInCommonPoolPossiblyReused()
2223
clusterID := clusterInfo.ClusterID

jobs/acceptance/job_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func TestAccJobResource(t *testing.T) {
177177
if _, ok := os.LookupEnv("CLOUD_ENV"); !ok {
178178
t.Skip("Acceptance tests skipped unless env 'CLOUD_ENV' is set")
179179
}
180-
180+
t.Parallel()
181181
clustersAPI := clusters.NewClustersAPI(context.Background(), common.CommonEnvironmentClient())
182182
sparkVersion := clustersAPI.LatestSparkVersionOrDefault(clusters.SparkVersionRequest{Latest: true, LongTermSupport: true})
183183
acceptance.AccTest(t, resource.TestCase{

libraries/acceptance/libraries_api_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ func TestAccLibraryCreate(t *testing.T) {
1717
if cloud == "" {
1818
t.Skip("Acceptance tests skipped unless env 'CLOUD_ENV' is set")
1919
}
20+
t.Parallel()
2021
client := common.CommonEnvironmentClient()
2122
clusterInfo, err := compute.NewTinyClusterInCommonPool()
2223
assert.NoError(t, err, err)

mlflow/acceptance/mlflow_experiment_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
)
88

99
func TestAccMLflowExperiment(t *testing.T) {
10+
t.Parallel()
1011
acceptance.Test(t, []acceptance.Step{
1112
{
1213
Template: `

mlflow/acceptance/mlflow_model_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
)
88

99
func TestAccMLflowModel(t *testing.T) {
10+
t.Parallel()
1011
acceptance.Test(t, []acceptance.Step{
1112
{
1213
Template: `

permissions/acceptance/api_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func permissionsTestHelper(t *testing.T,
2626
if os.Getenv("CLOUD_ENV") == "" {
2727
t.Skip("Acceptance tests skipped unless env 'CLOUD_ENV' is set")
2828
}
29+
t.Parallel()
2930
randomName := acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)
3031
client := common.NewClientFromEnvironment()
3132

0 commit comments

Comments
 (0)