From c680ac066efdc5484bd4ed7f0f5c66c6c149dd31 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Tue, 9 Aug 2022 10:18:32 +0200 Subject: gitpipe: Parallelize tests The gitpipe tests are not parallelized right now. Fix this by adding the missing calls to `t.Parallel()`. --- internal/git/gitpipe/catfile_info_test.go | 4 ++++ internal/git/gitpipe/catfile_object_test.go | 2 ++ internal/git/gitpipe/diff_tree_test.go | 2 ++ internal/git/gitpipe/ls_tree_test.go | 2 ++ internal/git/gitpipe/pipeline_test.go | 4 ++++ internal/git/gitpipe/revision_test.go | 6 ++++++ 6 files changed, 20 insertions(+) (limited to 'internal') diff --git a/internal/git/gitpipe/catfile_info_test.go b/internal/git/gitpipe/catfile_info_test.go index ecee41616..8872b3e11 100644 --- a/internal/git/gitpipe/catfile_info_test.go +++ b/internal/git/gitpipe/catfile_info_test.go @@ -19,6 +19,8 @@ import ( ) func TestCatfileInfo(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) cfg := testcfg.Build(t) @@ -281,6 +283,8 @@ func TestCatfileInfo(t *testing.T) { } func TestCatfileInfoAllObjects(t *testing.T) { + t.Parallel() + cfg := testcfg.Build(t) ctx := testhelper.Context(t) diff --git a/internal/git/gitpipe/catfile_object_test.go b/internal/git/gitpipe/catfile_object_test.go index adc16678e..ebbeee874 100644 --- a/internal/git/gitpipe/catfile_object_test.go +++ b/internal/git/gitpipe/catfile_object_test.go @@ -20,6 +20,8 @@ import ( ) func TestCatfileObject(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) cfg := testcfg.Build(t) diff --git a/internal/git/gitpipe/diff_tree_test.go b/internal/git/gitpipe/diff_tree_test.go index 556ec4e9f..5ea74263c 100644 --- a/internal/git/gitpipe/diff_tree_test.go +++ b/internal/git/gitpipe/diff_tree_test.go @@ -16,6 +16,8 @@ import ( ) func TestDiffTree(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) cfg := testcfg.Build(t) diff --git a/internal/git/gitpipe/ls_tree_test.go b/internal/git/gitpipe/ls_tree_test.go index fd82e1921..87afb8390 100644 --- a/internal/git/gitpipe/ls_tree_test.go +++ b/internal/git/gitpipe/ls_tree_test.go @@ -15,6 +15,8 @@ import ( ) func TestLsTree(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) cfg := testcfg.Build(t) diff --git a/internal/git/gitpipe/pipeline_test.go b/internal/git/gitpipe/pipeline_test.go index 33778946d..7271509c7 100644 --- a/internal/git/gitpipe/pipeline_test.go +++ b/internal/git/gitpipe/pipeline_test.go @@ -19,6 +19,8 @@ import ( ) func TestPipeline_revlist(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) cfg := testcfg.Build(t) @@ -386,6 +388,8 @@ func TestPipeline_revlist(t *testing.T) { } func TestPipeline_forEachRef(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) cfg := testcfg.Build(t) diff --git a/internal/git/gitpipe/revision_test.go b/internal/git/gitpipe/revision_test.go index 494bc54e7..5dfaffa15 100644 --- a/internal/git/gitpipe/revision_test.go +++ b/internal/git/gitpipe/revision_test.go @@ -19,6 +19,8 @@ import ( ) func TestRevlist(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) cfg := testcfg.Build(t) @@ -526,6 +528,8 @@ func TestRevlist(t *testing.T) { } func TestForEachRef(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) readRefs := func(t *testing.T, repo *localrepo.Repo, patterns []string, opts ...ForEachRefOption) []RevisionResult { @@ -658,6 +662,8 @@ func TestForEachRef(t *testing.T) { } func TestForEachRef_options(t *testing.T) { + t.Parallel() + ctx := testhelper.Context(t) for _, tc := range []struct { -- cgit v1.2.3