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:
-rw-r--r--cmd/praefect/subcmd_accept_dataloss_test.go1
-rw-r--r--cmd/praefect/subcmd_dataloss_test.go1
-rw-r--r--cmd/praefect/subcmd_set_replication_factor_test.go1
-rw-r--r--internal/praefect/coordinator_pg_test.go1
-rw-r--r--internal/praefect/coordinator_test.go9
-rw-r--r--internal/praefect/datastore/assignment_test.go2
-rw-r--r--internal/praefect/datastore/collector_test.go1
-rw-r--r--internal/praefect/datastore/glsql/postgres_test.go1
-rw-r--r--internal/praefect/datastore/glsql/testing_test.go1
-rw-r--r--internal/praefect/datastore/listener_postgres_test.go6
-rw-r--r--internal/praefect/datastore/postgres_test.go1
-rw-r--r--internal/praefect/datastore/queue_test.go11
-rw-r--r--internal/praefect/datastore/repository_store_test.go2
-rw-r--r--internal/praefect/info_service_test.go1
-rw-r--r--internal/praefect/nodes/health_manager_test.go1
-rw-r--r--internal/praefect/nodes/per_repository_test.go1
-rw-r--r--internal/praefect/nodes/sql_elector_test.go6
-rw-r--r--internal/praefect/reconciler/reconciler_test.go1
-rw-r--r--internal/praefect/replicator_pg_test.go2
-rw-r--r--internal/praefect/replicator_test.go6
-rw-r--r--internal/praefect/repository_exists_test.go1
-rw-r--r--internal/praefect/server_factory_test.go1
-rw-r--r--internal/praefect/server_test.go10
-rw-r--r--internal/praefect/transaction_test.go8
24 files changed, 76 insertions, 0 deletions
diff --git a/cmd/praefect/subcmd_accept_dataloss_test.go b/cmd/praefect/subcmd_accept_dataloss_test.go
index ef5187227..8f8531833 100644
--- a/cmd/praefect/subcmd_accept_dataloss_test.go
+++ b/cmd/praefect/subcmd_accept_dataloss_test.go
@@ -15,6 +15,7 @@ import (
)
func TestAcceptDatalossSubcommand(t *testing.T) {
+ t.Parallel()
const (
vs = "test-virtual-storage-1"
repo = "test-repository-1"
diff --git a/cmd/praefect/subcmd_dataloss_test.go b/cmd/praefect/subcmd_dataloss_test.go
index 8fce062ce..a66f69d11 100644
--- a/cmd/praefect/subcmd_dataloss_test.go
+++ b/cmd/praefect/subcmd_dataloss_test.go
@@ -21,6 +21,7 @@ func registerPraefectInfoServer(impl gitalypb.PraefectInfoServiceServer) svcRegi
}
func TestDatalossSubcommand(t *testing.T) {
+ t.Parallel()
cfg := config.Config{
VirtualStorages: []*config.VirtualStorage{
{
diff --git a/cmd/praefect/subcmd_set_replication_factor_test.go b/cmd/praefect/subcmd_set_replication_factor_test.go
index b2eaa0226..f55316de0 100644
--- a/cmd/praefect/subcmd_set_replication_factor_test.go
+++ b/cmd/praefect/subcmd_set_replication_factor_test.go
@@ -17,6 +17,7 @@ import (
)
func TestSetReplicationFactorSubcommand(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
for _, tc := range []struct {
diff --git a/internal/praefect/coordinator_pg_test.go b/internal/praefect/coordinator_pg_test.go
index 4cdd0ce54..e1764b07a 100644
--- a/internal/praefect/coordinator_pg_test.go
+++ b/internal/praefect/coordinator_pg_test.go
@@ -26,6 +26,7 @@ import (
)
func TestStreamDirectorMutator_Transaction(t *testing.T) {
+ t.Parallel()
// For the test-with-praefect execution we disable a special case when repository
// records need to be created in the database.
defer testhelper.ModifyEnvironment(t, "GITALY_TEST_PRAEFECT_BIN", "")()
diff --git a/internal/praefect/coordinator_test.go b/internal/praefect/coordinator_test.go
index 99b906957..cd9557213 100644
--- a/internal/praefect/coordinator_test.go
+++ b/internal/praefect/coordinator_test.go
@@ -60,6 +60,7 @@ func TestSecondaryRotation(t *testing.T) {
}
func TestStreamDirectorReadOnlyEnforcement(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
for _, tc := range []struct {
desc string
@@ -136,6 +137,7 @@ func TestStreamDirectorReadOnlyEnforcement(t *testing.T) {
}
func TestStreamDirectorMutator(t *testing.T) {
+ t.Parallel()
gitalySocket0, gitalySocket1 := testhelper.GetTemporaryGitalySocketFileName(t), testhelper.GetTemporaryGitalySocketFileName(t)
testhelper.NewServerWithHealth(t, gitalySocket0)
testhelper.NewServerWithHealth(t, gitalySocket1)
@@ -240,6 +242,7 @@ func TestStreamDirectorMutator(t *testing.T) {
}
func TestStreamDirectorMutator_StopTransaction(t *testing.T) {
+ t.Parallel()
socket := testhelper.GetTemporaryGitalySocketFileName(t)
testhelper.NewServerWithHealth(t, socket)
@@ -359,6 +362,7 @@ func (m mockRouter) RouteRepositoryAccessor(ctx context.Context, virtualStorage,
}
func TestStreamDirectorAccessor(t *testing.T) {
+ t.Parallel()
gitalySocket := testhelper.GetTemporaryGitalySocketFileName(t)
testhelper.NewServerWithHealth(t, gitalySocket)
@@ -456,6 +460,7 @@ func TestStreamDirectorAccessor(t *testing.T) {
}
func TestCoordinatorStreamDirector_distributesReads(t *testing.T) {
+ t.Parallel()
gitalySocket0, gitalySocket1 := testhelper.GetTemporaryGitalySocketFileName(t), testhelper.GetTemporaryGitalySocketFileName(t)
primaryHealthSrv := testhelper.NewServerWithHealth(t, gitalySocket0)
healthSrv := testhelper.NewServerWithHealth(t, gitalySocket1)
@@ -735,6 +740,7 @@ func TestCoordinatorStreamDirector_distributesReads(t *testing.T) {
}
func TestStreamDirector_repo_creation(t *testing.T) {
+ t.Parallel()
// For the test-with-praefect execution we disable a special case when repository
// records need to be created in the database.
defer testhelper.ModifyEnvironment(t, "GITALY_TEST_PRAEFECT_BIN", "")()
@@ -988,6 +994,7 @@ func (m *mockPeeker) Modify(payload []byte) error {
}
func TestAbsentCorrelationID(t *testing.T) {
+ t.Parallel()
gitalySocket0, gitalySocket1 := testhelper.GetTemporaryGitalySocketFileName(t), testhelper.GetTemporaryGitalySocketFileName(t)
healthSrv0 := testhelper.NewServerWithHealth(t, gitalySocket0)
healthSrv1 := testhelper.NewServerWithHealth(t, gitalySocket1)
@@ -1073,6 +1080,7 @@ func TestAbsentCorrelationID(t *testing.T) {
}
func TestCoordinatorEnqueueFailure(t *testing.T) {
+ t.Parallel()
conf := config.Config{
VirtualStorages: []*config.VirtualStorage{
&config.VirtualStorage{
@@ -1406,6 +1414,7 @@ func (c *mockDiskCache) StartLease(*gitalypb.Repository) (cache.LeaseEnder, erro
// fails. Most importantly, we want to make sure to only ever forward errors from the primary and
// never from the secondaries.
func TestCoordinator_grpcErrorHandling(t *testing.T) {
+ t.Parallel()
praefectConfig := config.Config{
VirtualStorages: []*config.VirtualStorage{
&config.VirtualStorage{
diff --git a/internal/praefect/datastore/assignment_test.go b/internal/praefect/datastore/assignment_test.go
index c27f6dc81..c8ac5ad84 100644
--- a/internal/praefect/datastore/assignment_test.go
+++ b/internal/praefect/datastore/assignment_test.go
@@ -9,6 +9,7 @@ import (
)
func TestAssignmentStore_GetHostAssignments(t *testing.T) {
+ t.Parallel()
type assignment struct {
virtualStorage string
relativePath string
@@ -101,6 +102,7 @@ func TestAssignmentStore_GetHostAssignments(t *testing.T) {
}
func TestAssignmentStore_SetReplicationFactor(t *testing.T) {
+ t.Parallel()
type matcher func(testing.TB, []string)
equal := func(expected []string) matcher {
diff --git a/internal/praefect/datastore/collector_test.go b/internal/praefect/datastore/collector_test.go
index dc23889a8..3514b1239 100644
--- a/internal/praefect/datastore/collector_test.go
+++ b/internal/praefect/datastore/collector_test.go
@@ -16,6 +16,7 @@ import (
)
func TestRepositoryStoreCollector(t *testing.T) {
+ t.Parallel()
ctx, cancel := testhelper.Context()
defer cancel()
diff --git a/internal/praefect/datastore/glsql/postgres_test.go b/internal/praefect/datastore/glsql/postgres_test.go
index 86a990d51..5616274bd 100644
--- a/internal/praefect/datastore/glsql/postgres_test.go
+++ b/internal/praefect/datastore/glsql/postgres_test.go
@@ -61,6 +61,7 @@ func TestUint64Provider(t *testing.T) {
}
func TestScanAll(t *testing.T) {
+ t.Parallel()
db := NewDB(t)
var ids Uint64Provider
diff --git a/internal/praefect/datastore/glsql/testing_test.go b/internal/praefect/datastore/glsql/testing_test.go
index 1f6259b55..26a4f499c 100644
--- a/internal/praefect/datastore/glsql/testing_test.go
+++ b/internal/praefect/datastore/glsql/testing_test.go
@@ -7,6 +7,7 @@ import (
)
func TestDB_Truncate(t *testing.T) {
+ t.Parallel()
db := NewDB(t)
_, err := db.Exec("CREATE TABLE truncate_tbl(id BIGSERIAL PRIMARY KEY)")
diff --git a/internal/praefect/datastore/listener_postgres_test.go b/internal/praefect/datastore/listener_postgres_test.go
index ac9b12a28..53f1cc403 100644
--- a/internal/praefect/datastore/listener_postgres_test.go
+++ b/internal/praefect/datastore/listener_postgres_test.go
@@ -84,6 +84,7 @@ func (mlh mockListenHandler) Connected() {
}
func TestPostgresListener_Listen(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
logger := testhelper.NewTestLogger(t)
@@ -365,6 +366,7 @@ func requireEqualNotificationEntries(t *testing.T, d string, entries []notificat
}
func TestPostgresListener_Listen_repositories_delete(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
const channel = "repositories_updates"
@@ -397,6 +399,7 @@ func TestPostgresListener_Listen_repositories_delete(t *testing.T) {
}
func TestPostgresListener_Listen_storage_repositories_insert(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
const channel = "storage_repositories_updates"
@@ -422,6 +425,7 @@ func TestPostgresListener_Listen_storage_repositories_insert(t *testing.T) {
}
func TestPostgresListener_Listen_storage_repositories_update(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
const channel = "storage_repositories_updates"
@@ -446,6 +450,7 @@ func TestPostgresListener_Listen_storage_repositories_update(t *testing.T) {
}
func TestPostgresListener_Listen_storage_empty_notification(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
const channel = "storage_repositories_updates"
@@ -464,6 +469,7 @@ func TestPostgresListener_Listen_storage_empty_notification(t *testing.T) {
}
func TestPostgresListener_Listen_storage_repositories_delete(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
const channel = "storage_repositories_updates"
diff --git a/internal/praefect/datastore/postgres_test.go b/internal/praefect/datastore/postgres_test.go
index 257fc46f0..9ae3a78be 100644
--- a/internal/praefect/datastore/postgres_test.go
+++ b/internal/praefect/datastore/postgres_test.go
@@ -9,6 +9,7 @@ import (
)
func TestMigrateStatus(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
config := config.Config{
diff --git a/internal/praefect/datastore/queue_test.go b/internal/praefect/datastore/queue_test.go
index 93caabcaa..6ed781286 100644
--- a/internal/praefect/datastore/queue_test.go
+++ b/internal/praefect/datastore/queue_test.go
@@ -13,6 +13,7 @@ import (
)
func TestPostgresReplicationEventQueue_DeleteReplicaUniqueIndex(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
for _, tc := range []struct {
desc string
@@ -152,6 +153,7 @@ func TestPostgresReplicationEventQueue_DeleteReplicaUniqueIndex(t *testing.T) {
}
func TestPostgresReplicationEventQueue_Enqueue(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
ctx, cancel := testhelper.Context()
@@ -198,6 +200,7 @@ func TestPostgresReplicationEventQueue_Enqueue(t *testing.T) {
}
func TestPostgresReplicationEventQueue_DeleteReplicaInfiniteAttempts(t *testing.T) {
+ t.Parallel()
queue := NewPostgresReplicationEventQueue(glsql.NewDB(t))
ctx, cancel := testhelper.Context()
@@ -248,6 +251,7 @@ func TestPostgresReplicationEventQueue_DeleteReplicaInfiniteAttempts(t *testing.
}
func TestPostgresReplicationEventQueue_EnqueueMultiple(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
ctx, cancel := testhelper.Context()
@@ -381,6 +385,7 @@ func TestPostgresReplicationEventQueue_EnqueueMultiple(t *testing.T) {
}
func TestPostgresReplicationEventQueue_Dequeue(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
ctx, cancel := testhelper.Context()
@@ -429,6 +434,7 @@ func TestPostgresReplicationEventQueue_Dequeue(t *testing.T) {
// expected results are listed as literals on purpose to be more explicit about what is going on with data
func TestPostgresReplicationEventQueue_DequeueMultiple(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
ctx, cancel := testhelper.Context()
@@ -538,6 +544,7 @@ func TestPostgresReplicationEventQueue_DequeueMultiple(t *testing.T) {
}
func TestPostgresReplicationEventQueue_DequeueSameStorageOtherRepository(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
ctx, cancel := testhelper.Context()
@@ -600,6 +607,7 @@ func TestPostgresReplicationEventQueue_DequeueSameStorageOtherRepository(t *test
}
func TestPostgresReplicationEventQueue_Acknowledge(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
ctx, cancel := testhelper.Context()
@@ -643,6 +651,7 @@ func TestPostgresReplicationEventQueue_Acknowledge(t *testing.T) {
}
func TestPostgresReplicationEventQueue_AcknowledgeMultiple(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
ctx, cancel := testhelper.Context()
@@ -814,6 +823,7 @@ func TestPostgresReplicationEventQueue_AcknowledgeMultiple(t *testing.T) {
}
func TestPostgresReplicationEventQueue_StartHealthUpdate(t *testing.T) {
+ t.Parallel()
eventType1 := ReplicationEvent{Job: ReplicationJob{
Change: UpdateRepo,
VirtualStorage: "vs-1",
@@ -954,6 +964,7 @@ func TestPostgresReplicationEventQueue_StartHealthUpdate(t *testing.T) {
}
func TestPostgresReplicationEventQueue_AcknowledgeStale(t *testing.T) {
+ t.Parallel()
ctx, cancel := testhelper.Context()
defer cancel()
diff --git a/internal/praefect/datastore/repository_store_test.go b/internal/praefect/datastore/repository_store_test.go
index c6d1cfe42..22db3177b 100644
--- a/internal/praefect/datastore/repository_store_test.go
+++ b/internal/praefect/datastore/repository_store_test.go
@@ -30,6 +30,7 @@ type requireState func(t *testing.T, ctx context.Context, vss virtualStorageStat
type repositoryStoreFactory func(t *testing.T, storages map[string][]string) (RepositoryStore, requireState)
func TestRepositoryStore_Postgres(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
testRepositoryStore(t, func(t *testing.T, storages map[string][]string) (RepositoryStore, requireState) {
db.TruncateAll(t)
@@ -842,6 +843,7 @@ func testRepositoryStore(t *testing.T, newStore repositoryStoreFactory) {
}
func TestPostgresRepositoryStore_GetPartiallyAvailableRepositories(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
for _, tc := range []struct {
desc string
diff --git a/internal/praefect/info_service_test.go b/internal/praefect/info_service_test.go
index 4dc8f755e..e289040ad 100644
--- a/internal/praefect/info_service_test.go
+++ b/internal/praefect/info_service_test.go
@@ -22,6 +22,7 @@ import (
)
func TestInfoService_RepositoryReplicas(t *testing.T) {
+ t.Parallel()
var cfgs []gconfig.Cfg
var cfgNodes []*config.Node
var testRepo *gitalypb.Repository
diff --git a/internal/praefect/nodes/health_manager_test.go b/internal/praefect/nodes/health_manager_test.go
index ba36b27c3..07b359090 100644
--- a/internal/praefect/nodes/health_manager_test.go
+++ b/internal/praefect/nodes/health_manager_test.go
@@ -24,6 +24,7 @@ func (m mockHealthClient) Check(ctx context.Context, r *grpc_health_v1.HealthChe
}
func TestHealthManager(t *testing.T) {
+ t.Parallel()
ctx, cancel := testhelper.Context()
defer cancel()
diff --git a/internal/praefect/nodes/per_repository_test.go b/internal/praefect/nodes/per_repository_test.go
index 9789cbc79..b37071251 100644
--- a/internal/praefect/nodes/per_repository_test.go
+++ b/internal/praefect/nodes/per_repository_test.go
@@ -14,6 +14,7 @@ import (
)
func TestPerRepositoryElector(t *testing.T) {
+ t.Parallel()
ctx, cancel := testhelper.Context()
defer cancel()
diff --git a/internal/praefect/nodes/sql_elector_test.go b/internal/praefect/nodes/sql_elector_test.go
index 82156c1f1..09d0a89c2 100644
--- a/internal/praefect/nodes/sql_elector_test.go
+++ b/internal/praefect/nodes/sql_elector_test.go
@@ -28,6 +28,7 @@ import (
var shardName string = "test-shard-0"
func TestGetPrimaryAndSecondaries(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
logger := testhelper.NewTestLogger(t).WithField("test", t.Name())
@@ -71,6 +72,7 @@ func TestGetPrimaryAndSecondaries(t *testing.T) {
}
func TestSqlElector_slow_execution(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
praefectSocket := "unix://" + testhelper.GetTemporaryGitalySocketFileName(t)
@@ -108,6 +110,7 @@ func TestSqlElector_slow_execution(t *testing.T) {
}
func TestBasicFailover(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
logger := testhelper.NewTestLogger(t).WithField("test", t.Name())
@@ -216,6 +219,7 @@ func TestBasicFailover(t *testing.T) {
}
func TestElectDemotedPrimary(t *testing.T) {
+ t.Parallel()
tx := glsql.NewDB(t).Begin(t)
defer tx.Rollback(t)
@@ -281,6 +285,7 @@ func predateElection(t testing.TB, ctx context.Context, db glsql.Querier, shardN
}
func TestElectNewPrimary(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
ns := []*nodeStatus{{
@@ -419,6 +424,7 @@ func TestElectNewPrimary(t *testing.T) {
}
func TestConnectionMultiplexing(t *testing.T) {
+ t.Parallel()
errNonMuxed := status.Error(codes.Internal, "non-muxed connection")
errMuxed := status.Error(codes.Internal, "muxed connection")
diff --git a/internal/praefect/reconciler/reconciler_test.go b/internal/praefect/reconciler/reconciler_test.go
index 8fc77bcbc..2fff58c63 100644
--- a/internal/praefect/reconciler/reconciler_test.go
+++ b/internal/praefect/reconciler/reconciler_test.go
@@ -18,6 +18,7 @@ import (
)
func TestReconciler(t *testing.T) {
+ t.Parallel()
// repositories describes storage state as
// virtual storage -> relative path -> physical storage -> generation
diff --git a/internal/praefect/replicator_pg_test.go b/internal/praefect/replicator_pg_test.go
index d6661e336..63e21b223 100644
--- a/internal/praefect/replicator_pg_test.go
+++ b/internal/praefect/replicator_pg_test.go
@@ -27,6 +27,7 @@ func (m *mockRepositoryService) ReplicateRepository(ctx context.Context, r *gita
}
func TestReplicatorInvalidSourceRepository(t *testing.T) {
+ t.Parallel()
ctx, cancel := testhelper.Context()
defer cancel()
@@ -67,6 +68,7 @@ func TestReplicatorInvalidSourceRepository(t *testing.T) {
}
func TestReplicatorDestroy(t *testing.T) {
+ t.Parallel()
db := glsql.NewDB(t)
for _, tc := range []struct {
change datastore.ChangeType
diff --git a/internal/praefect/replicator_test.go b/internal/praefect/replicator_test.go
index 319d92509..0ad2dcd7f 100644
--- a/internal/praefect/replicator_test.go
+++ b/internal/praefect/replicator_test.go
@@ -57,6 +57,7 @@ func testMain(m *testing.M) int {
}
func TestReplMgr_ProcessBacklog(t *testing.T) {
+ t.Parallel()
primaryCfg, testRepo, testRepoPath := testcfg.BuildWithRepo(t, testcfg.WithStorages("primary"))
primaryCfg.SocketPath = testserver.RunGitalyServer(t, primaryCfg, nil, setup.RegisterAll, testserver.WithDisablePraefect())
testhelper.BuildGitalySSH(t, primaryCfg)
@@ -264,6 +265,7 @@ func TestReplicatorDowngradeAttempt(t *testing.T) {
}
func TestReplicator_PropagateReplicationJob(t *testing.T) {
+ t.Parallel()
primaryStorage, secondaryStorage := "internal-gitaly-0", "internal-gitaly-1"
primCfg := testcfg.Build(t, testcfg.WithStorages(primaryStorage))
@@ -632,6 +634,7 @@ func getChecksumFunc(ctx context.Context, client gitalypb.RepositoryServiceClien
}
func TestProcessBacklog_FailedJobs(t *testing.T) {
+ t.Parallel()
primaryCfg, testRepo, _ := testcfg.BuildWithRepo(t, testcfg.WithStorages("default"))
primaryAddr := testserver.RunGitalyServer(t, primaryCfg, nil, setup.RegisterAll, testserver.WithDisablePraefect())
@@ -753,6 +756,7 @@ func TestProcessBacklog_FailedJobs(t *testing.T) {
}
func TestProcessBacklog_Success(t *testing.T) {
+ t.Parallel()
primaryCfg, testRepo, _ := testcfg.BuildWithRepo(t, testcfg.WithStorages("primary"))
primaryCfg.SocketPath = testserver.RunGitalyServer(t, primaryCfg, nil, setup.RegisterAll, testserver.WithDisablePraefect())
testhelper.BuildGitalySSH(t, primaryCfg)
@@ -893,6 +897,7 @@ func TestProcessBacklog_Success(t *testing.T) {
}
func TestReplMgrProcessBacklog_OnlyHealthyNodes(t *testing.T) {
+ t.Parallel()
conf := config.Config{
VirtualStorages: []*config.VirtualStorage{
{
@@ -970,6 +975,7 @@ func (m mockReplicator) Replicate(ctx context.Context, event datastore.Replicati
}
func TestProcessBacklog_ReplicatesToReadOnlyPrimary(t *testing.T) {
+ t.Parallel()
ctx, cancel := testhelper.Context()
defer cancel()
diff --git a/internal/praefect/repository_exists_test.go b/internal/praefect/repository_exists_test.go
index bc08d17aa..75db7e81b 100644
--- a/internal/praefect/repository_exists_test.go
+++ b/internal/praefect/repository_exists_test.go
@@ -21,6 +21,7 @@ import (
)
func TestRepositoryExistsStreamInterceptor(t *testing.T) {
+ t.Parallel()
errServedByGitaly := status.Error(codes.Unknown, "request passed to Gitaly")
db := glsql.NewDB(t)
diff --git a/internal/praefect/server_factory_test.go b/internal/praefect/server_factory_test.go
index 6cbaa282e..53bbc825b 100644
--- a/internal/praefect/server_factory_test.go
+++ b/internal/praefect/server_factory_test.go
@@ -33,6 +33,7 @@ import (
)
func TestServerFactory(t *testing.T) {
+ t.Parallel()
cfg, repo, repoPath := testcfg.BuildWithRepo(t)
gitalyAddr := testserver.RunGitalyServer(t, cfg, nil, setup.RegisterAll, testserver.WithDisablePraefect())
diff --git a/internal/praefect/server_test.go b/internal/praefect/server_test.go
index 77c150562..47647be11 100644
--- a/internal/praefect/server_test.go
+++ b/internal/praefect/server_test.go
@@ -113,6 +113,7 @@ func TestNewBackchannelServerFactory(t *testing.T) {
}
func TestGitalyServerInfo(t *testing.T) {
+ t.Parallel()
ctx, cancel := testhelper.Context()
defer cancel()
@@ -206,6 +207,7 @@ func TestGitalyServerInfo(t *testing.T) {
}
func TestGitalyServerInfoBadNode(t *testing.T) {
+ t.Parallel()
gitalySocket := testhelper.GetTemporaryGitalySocketFileName(t)
healthSrv := testhelper.NewServerWithHealth(t, gitalySocket)
healthSrv.SetServingStatus("", grpc_health_v1.HealthCheckResponse_UNKNOWN)
@@ -244,6 +246,7 @@ func TestGitalyServerInfoBadNode(t *testing.T) {
}
func TestDiskStatistics(t *testing.T) {
+ t.Parallel()
praefectCfg := config.Config{VirtualStorages: []*config.VirtualStorage{{Name: "praefect"}}}
for _, name := range []string{"gitaly-1", "gitaly-2"} {
gitalyCfg := testcfg.Build(t)
@@ -281,6 +284,7 @@ func TestDiskStatistics(t *testing.T) {
}
func TestHealthCheck(t *testing.T) {
+ t.Parallel()
ctx, cancel := testhelper.Context()
defer cancel()
@@ -302,6 +306,7 @@ func TestHealthCheck(t *testing.T) {
}
func TestRejectBadStorage(t *testing.T) {
+ t.Parallel()
conf := config.Config{
VirtualStorages: []*config.VirtualStorage{
{
@@ -334,6 +339,7 @@ func TestRejectBadStorage(t *testing.T) {
}
func TestWarnDuplicateAddrs(t *testing.T) {
+ t.Parallel()
conf := config.Config{
VirtualStorages: []*config.VirtualStorage{
&config.VirtualStorage{
@@ -463,6 +469,7 @@ func TestWarnDuplicateAddrs(t *testing.T) {
}
func TestRemoveRepository(t *testing.T) {
+ t.Parallel()
gitalyCfgs := make([]gconfig.Cfg, 3)
repos := make([][]*gitalypb.Repository, 3)
praefectCfg := config.Config{VirtualStorages: []*config.VirtualStorage{{Name: "praefect"}}}
@@ -562,6 +569,7 @@ func pollUntilRemoved(t testing.TB, path string, deadline <-chan time.Time) {
}
func TestRenameRepository(t *testing.T) {
+ t.Parallel()
gitalyStorages := []string{"gitaly-1", "gitaly-2", "gitaly-3"}
repoPaths := make([]string, len(gitalyStorages))
praefectCfg := config.Config{
@@ -738,6 +746,7 @@ func newSmartHTTPGrpcServer(t *testing.T, cfg gconfig.Cfg, smartHTTPService gita
}
func TestProxyWrites(t *testing.T) {
+ t.Parallel()
txMgr := transactions.NewManager(config.Config{})
smartHTTP0, smartHTTP1, smartHTTP2 := &mockSmartHTTP{txMgr: txMgr}, &mockSmartHTTP{txMgr: txMgr}, &mockSmartHTTP{txMgr: txMgr}
@@ -857,6 +866,7 @@ func TestProxyWrites(t *testing.T) {
}
func TestErrorThreshold(t *testing.T) {
+ t.Parallel()
backendToken := ""
backend, cleanup := newMockDownstream(t, backendToken, &mockSvc{
repoMutatorUnary: func(ctx context.Context, req *mock.RepoRequest) (*emptypb.Empty, error) {
diff --git a/internal/praefect/transaction_test.go b/internal/praefect/transaction_test.go
index 80da5b777..7f79c1430 100644
--- a/internal/praefect/transaction_test.go
+++ b/internal/praefect/transaction_test.go
@@ -70,6 +70,7 @@ func verifyCounterMetrics(t *testing.T, manager *transactions.Manager, expected
}
func TestTransactionSucceeds(t *testing.T) {
+ t.Parallel()
ctx, cancel := testhelper.Context()
defer cancel()
@@ -110,6 +111,7 @@ func TestTransactionSucceeds(t *testing.T) {
}
func TestTransactionWithMultipleNodes(t *testing.T) {
+ t.Parallel()
testcases := []struct {
desc string
nodes []string
@@ -220,6 +222,7 @@ func TestTransactionWithMultipleNodes(t *testing.T) {
}
func TestTransactionWithContextCancellation(t *testing.T) {
+ t.Parallel()
ctx, cancel := testhelper.Context()
defer cancel()
@@ -330,6 +333,7 @@ func TestTransactionRegistrationWithInvalidThresholdFails(t *testing.T) {
}
func TestTransactionReachesQuorum(t *testing.T) {
+ t.Parallel()
tc := []struct {
desc string
voters []voter
@@ -459,6 +463,7 @@ func TestTransactionReachesQuorum(t *testing.T) {
}
func TestTransactionWithMultipleVotes(t *testing.T) {
+ t.Parallel()
type multiVoter struct {
voteCount uint
votes []string
@@ -567,6 +572,7 @@ func TestTransactionWithMultipleVotes(t *testing.T) {
}
func TestTransactionFailures(t *testing.T) {
+ t.Parallel()
ctx, cancel := testhelper.Context()
defer cancel()
@@ -595,6 +601,7 @@ func TestTransactionFailures(t *testing.T) {
}
func TestTransactionCancellation(t *testing.T) {
+ t.Parallel()
testcases := []struct {
desc string
voters []voter
@@ -713,6 +720,7 @@ func TestTransactionCancellation(t *testing.T) {
}
func TestStopTransaction(t *testing.T) {
+ t.Parallel()
hash := sha1.Sum([]byte("foo"))
t.Run("stopping nonexisting transaction fails", func(t *testing.T) {