Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2022-12-07 11:15:49 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2022-12-13 15:32:45 +0300
commit581bd110aa83385b3c864c780b1dd721a8f37c20 (patch)
tree375c0953f33ee827d9cc1594c23be7d21642f5a5
parent3c6d2960d3dcf39d59f67f77752508a5e65479af (diff)
repository: Parallelize tests to calculate repository size
The tests to calculate the repository size are quite slow, and there is a bunch of them due to the combination of the different feature flags we test here. Parallelize them to speed up the runtime. Before: ok gitlab.com/gitlab-org/gitaly/v15/internal/gitaly/service/repository 2.387s After: ok gitlab.com/gitlab-org/gitaly/v15/internal/gitaly/service/repository 1.396s
-rw-r--r--internal/gitaly/service/repository/size_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/gitaly/service/repository/size_test.go b/internal/gitaly/service/repository/size_test.go
index beda7efac..a6fb0a765 100644
--- a/internal/gitaly/service/repository/size_test.go
+++ b/internal/gitaly/service/repository/size_test.go
@@ -44,8 +44,9 @@ func TestRepositorySize_SuccessfulRequest(t *testing.T) {
}
func testSuccessfulRepositorySizeRequestPoolMember(t *testing.T, ctx context.Context) {
- cfg := testcfg.Build(t)
+ t.Parallel()
+ cfg := testcfg.Build(t)
repoClient, serverSocketPath := runRepositoryService(t, cfg, nil)
cfg.SocketPath = serverSocketPath
@@ -103,6 +104,8 @@ func testSuccessfulRepositorySizeRequestPoolMember(t *testing.T, ctx context.Con
}
func testSuccessfulRepositorySizeRequest(t *testing.T, ctx context.Context) {
+ t.Parallel()
+
logger, hook := test.NewNullLogger()
cfg, repo, repoPath, client := setupRepositoryService(t, ctx, testserver.WithLogger(logger))