Reset root prune interval after TestLeader_CARootPruning completes

#10645

Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>
pull/10705/head
Freddy 2021-07-26 15:43:40 -06:00 committed by GitHub
parent 91c90a672a
commit ff9700b068
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)