diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2023-02-16 13:20:00 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2023-02-16 17:31:50 +0300 |
commit | 62bea70d5e3014506ecb67ddf2a2c9be16aea445 (patch) | |
tree | eecd1b27bed1eb890c602f25af58345898e5ba22 /internal | |
parent | f223d8cbcb6319356cb9f746252b15e541695d2f (diff) |
Disable background verifier in tests
Praefect's background verifier was recently changed to delete
invalid metadata by default. This can cause test flakes as some test
cases purposefully create such states. Given it would be surprising
to have the background verifier issue RPCs and delete state during
a test, disable it in the tests.
Diffstat (limited to 'internal')
-rw-r--r-- | internal/testhelper/testserver/gitaly.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/testhelper/testserver/gitaly.go b/internal/testhelper/testserver/gitaly.go index 12da30497..9f69e69da 100644 --- a/internal/testhelper/testserver/gitaly.go +++ b/internal/testhelper/testserver/gitaly.go @@ -98,6 +98,14 @@ func runPraefectProxy(tb testing.TB, gitalyCfg config.Cfg, gitalyAddr string) Pr Enabled: true, ElectionStrategy: praefectconfig.ElectionStrategyLocal, }, + BackgroundVerification: praefectconfig.BackgroundVerification{ + // Some tests cases purposefully create bad metadata by deleting a repository off + // the disk. If the background verifier is running, it could find these repositories + // and remove the invalid metadata related to them. This can cause the test assertions + // to fail. As the background verifier runs asynchronously and possibly changes state + // during a test and issues unexpected RPCs, it's disabled generally for all tests. + VerificationInterval: -1, + }, Replication: praefectconfig.DefaultReplicationConfig(), Logging: gitalylog.Config{ Format: "json", |