Reset root prune interval after TestLeader_CARootPruning completes

#10645

Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>
This commit is contained in:
Freddy 2021-07-26 15:43:40 -06:00 committed by GitHub
parent 6341183a84
commit b136b1795a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -1177,7 +1177,12 @@ func TestLeader_CARootPruning(t *testing.T) {
}
// Can not use t.Parallel(), because this modifies a global.
origPruneInterval := caRootPruneInterval
caRootPruneInterval = 200 * time.Millisecond
t.Cleanup(func() {
// Reset the value of the global prune interval so that it doesn't affect other tests
caRootPruneInterval = origPruneInterval
})
require := require.New(t)
dir1, s1 := testServer(t)