diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2021-04-13 14:16:30 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2021-04-13 14:44:05 +0300 |
commit | 0c9f6a5522c314f0b5fa0841578a9a49c2a6661f (patch) | |
tree | c10be58308555a56bca371a8c11d330db149f07c /internal/praefect/coordinator_test.go | |
parent | 996add2f4e011cec8e9317912978cf1fa59e66c1 (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.go | 6 |
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) |