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:
authorSami Hiltunen <shiltunen@gitlab.com>2021-04-13 14:16:30 +0300
committerSami Hiltunen <shiltunen@gitlab.com>2021-04-13 14:44:05 +0300
commit0c9f6a5522c314f0b5fa0841578a9a49c2a6661f (patch)
treec10be58308555a56bca371a8c11d330db149f07c /internal/praefect/coordinator_test.go
parent996add2f4e011cec8e9317912978cf1fa59e66c1 (diff)
support muxed connection in DisabledElector
GitLab's tests use Praefect with the DisabledElector. Recently an MR was merged to default enable all Gitaly and Praefect feature flags when the tests are being run. The pipeline was failign as the DisabledElector did not support the connection multiplexing and the feature flags were enabled. Fix this by passing the multiplexed connections in to the DisabledElector as well.
Diffstat (limited to 'internal/praefect/coordinator_test.go')
-rw-r--r--internal/praefect/coordinator_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/praefect/coordinator_test.go b/internal/praefect/coordinator_test.go
index a58413009..ae38bdca9 100644
--- a/internal/praefect/coordinator_test.go
+++ b/internal/praefect/coordinator_test.go
@@ -909,6 +909,12 @@ func TestStreamDirector_repo_creation(t *testing.T) {
ctx, cancel := testhelper.Context()
defer cancel()
+ // NodeManager does not provide a way to get access to the muxed connections easily. The test does
+ // not set up the database, so GetShard fails. As such, let's just disable the feature flag in this
+ // test. Once the muxed connections are setup by default, the test will test them and the feature flag
+ // is removed.
+ ctx = featureflag.IncomingCtxWithDisabledFeatureFlag(ctx, featureflag.ConnectionMultiplexing)
+
peeker := &mockPeeker{frame}
streamParams, err := coordinator.StreamDirector(correlation.ContextWithCorrelation(ctx, "my-correlation-id"), fullMethod, peeker)
require.NoError(t, err)