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:
authorJohn Cai <jcai@gitlab.com>2020-06-25 20:40:09 +0300
committerSami Hiltunen <shiltunen@gitlab.com>2020-08-31 17:24:54 +0300
commit1320783bf1f353850c7837aac3e51f7d3331a107 (patch)
tree7462e6e237c6e03724356f95a4b8a5f3196e5da7 /internal/praefect/auth_test.go
parent1f0b1740e98525102b3b1c6650a01cd57fe311c7 (diff)
Use error tracker to determine if node is healthy
Hooks up the error tracker in the node manager so it checks if a certain backend node has reached a threshold of errors. If it has, then it will be deemed unhealthy.
Diffstat (limited to 'internal/praefect/auth_test.go')
-rw-r--r--internal/praefect/auth_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/praefect/auth_test.go b/internal/praefect/auth_test.go
index cfe119a58..6d0eb9b01 100644
--- a/internal/praefect/auth_test.go
+++ b/internal/praefect/auth_test.go
@@ -167,8 +167,9 @@ func runServer(t *testing.T, token string, required bool) (*grpc.Server, string,
logEntry := testhelper.DiscardTestEntry(t)
queue := datastore.NewMemoryReplicationEventQueue(conf)
+ rs := datastore.NewMemoryRepositoryStore(conf.StorageNames())
- nodeMgr, err := nodes.NewManager(logEntry, conf, nil, nil, promtest.NewMockHistogramVec())
+ nodeMgr, err := nodes.NewManager(logEntry, conf, nil, rs, promtest.NewMockHistogramVec(), protoregistry.GitalyProtoPreregistered, nil)
require.NoError(t, err)
txMgr := transactions.NewManager(conf)
@@ -176,8 +177,6 @@ func runServer(t *testing.T, token string, required bool) (*grpc.Server, string,
registry, err := protoregistry.New(fd)
require.NoError(t, err)
- rs := datastore.NewMemoryRepositoryStore(conf.StorageNames())
-
coordinator := NewCoordinator(queue, rs, nodeMgr, txMgr, conf, registry)
srv := NewGRPCServer(conf, logEntry, registry, coordinator.StreamDirector, nodeMgr, txMgr, queue, rs)