Skip to content

Commit 8bd347d

Browse files
MHBauerpmorie
authored andcommitted
run some integration subtests in parallel (openshift#1637)
I looked for all the long running tests. Saw that many had subtests. Let's try and run the subtests in parallel and see what happens.
1 parent b83800c commit 8bd347d

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

Diff for: test/integration/controller_binding_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
package integration
1818

1919
import (
20+
"net/http"
2021
"reflect"
2122
"testing"
2223

@@ -28,7 +29,6 @@ import (
2829

2930
"github.com/kubernetes-incubator/service-catalog/pkg/apis/servicecatalog/v1beta1"
3031
"github.com/kubernetes-incubator/service-catalog/test/util"
31-
"net/http"
3232
)
3333

3434
// TestCreateServiceBindingSuccess successful paths binding
@@ -416,7 +416,9 @@ func TestCreateServiceBindingWithParameters(t *testing.T) {
416416
},
417417
}
418418
for _, tc := range cases {
419+
tc := tc
419420
t.Run(tc.name, func(t *testing.T) {
421+
t.Parallel()
420422
ct := &controllerTest{
421423
t: t,
422424
broker: getTestBroker(),

Diff for: test/integration/controller_instance_test.go

+14
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ func TestCreateServiceInstanceNonExistentClusterServiceClassOrPlan(t *testing.T)
9999
},
100100
}
101101
for _, tc := range cases {
102+
tc := tc
102103
t.Run(tc.name, func(t *testing.T) {
104+
t.Parallel()
103105
ct := &controllerTest{
104106
t: t,
105107
broker: getTestBroker(),
@@ -421,7 +423,9 @@ func TestCreateServiceInstanceWithParameters(t *testing.T) {
421423
},
422424
}
423425
for _, tc := range cases {
426+
tc := tc
424427
t.Run(tc.name, func(t *testing.T) {
428+
t.Parallel()
425429
ct := &controllerTest{
426430
t: t,
427431
broker: getTestBroker(),
@@ -520,7 +524,9 @@ func TestUpdateServiceInstanceChangePlans(t *testing.T) {
520524
},
521525
}
522526
for _, tc := range cases {
527+
tc := tc
523528
t.Run(tc.name, func(t *testing.T) {
529+
t.Parallel()
524530
ct := &controllerTest{
525531
t: t,
526532
broker: getTestBroker(),
@@ -763,7 +769,9 @@ func TestUpdateServiceInstanceUpdateParameters(t *testing.T) {
763769
},
764770
}
765771
for _, tc := range cases {
772+
tc := tc
766773
t.Run(tc.name, func(t *testing.T) {
774+
t.Parallel()
767775
ct := &controllerTest{
768776
t: t,
769777
broker: getTestBroker(),
@@ -983,7 +991,9 @@ func TestCreateServiceInstanceWithProvisionFailure(t *testing.T) {
983991
},
984992
}
985993
for _, tc := range cases {
994+
tc := tc
986995
t.Run(tc.name, func(t *testing.T) {
996+
t.Parallel()
987997
ct := &controllerTest{
988998
t: t,
989999
broker: getTestBroker(),
@@ -1301,7 +1311,9 @@ func TestDeleteServiceInstance(t *testing.T) {
13011311
}
13021312

13031313
for _, tc := range cases {
1314+
tc := tc
13041315
t.Run(tc.name, func(t *testing.T) {
1316+
t.Parallel()
13051317
ct := &controllerTest{
13061318
t: t,
13071319
broker: getTestBroker(),
@@ -1502,7 +1514,9 @@ func TestPollServiceInstanceLastOperation(t *testing.T) {
15021514
},
15031515
}
15041516
for _, tc := range cases {
1517+
tc := tc
15051518
t.Run(tc.name, func(t *testing.T) {
1519+
t.Parallel()
15061520
ct := &controllerTest{
15071521
t: t,
15081522
broker: getTestBroker(),

Diff for: test/integration/controller_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ func TestBasicFlows(t *testing.T) {
106106
}
107107

108108
for _, tc := range cases {
109+
tc := tc
109110
t.Run(tc.name, func(t *testing.T) {
111+
t.Parallel()
110112
if tc.asyncForBindings {
111113
// Enable the AsyncBindingOperations feature
112114
utilfeature.DefaultFeatureGate.Set(fmt.Sprintf("%v=true", scfeatures.AsyncBindingOperations))

0 commit comments

Comments
 (0)