Skip to content

Commit b1f8f62

Browse files
vdemeestertekton-robot
authored andcommitted
test: reduce the number of examples tests running in parallel
- `t.Parallel()` marks a test function, telling Go that it can be run in parallel with other functions in the same package. - `-parallel` determines "how many test functions inside a single test package can run in parallel". As all examples tests are using `t.Parallel()`, they all run in parallel. This might overwhelm the kind cluster a bit. This is making sure we run at most 6 of them at the same time. It also removes the parents `t.Parallel()` as this is.. just weird. Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
1 parent 430ddae commit b1f8f62

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

test/e2e-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function run_e2e() {
174174
# and they cause a lot of noise in the logs, making it harder to debug integration
175175
# test failures.
176176
if [ "${RUN_YAML_TESTS}" == "true" ]; then
177-
go_test_e2e -mod=readonly -tags=examples -timeout=${E2E_GO_TEST_TIMEOUT} ./test/
177+
go_test_e2e -mod=readonly -parallel=6 -tags=examples -timeout=${E2E_GO_TEST_TIMEOUT} ./test/
178178
fi
179179

180180
if [ "${RUN_FEATUREFLAG_TESTS}" == "true" ]; then

test/examples_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ func TestExamples(t *testing.T) {
203203
}
204204

205205
func testYamls(t *testing.T, baseDir string, createFunc createFunc, filter pathFilter) {
206-
t.Parallel()
207206
for _, path := range getExamplePaths(t, baseDir, filter) {
208207
path := path // capture range variable
209208
testName := extractTestName(baseDir, path)

0 commit comments

Comments
 (0)