Fix race in exp tidy test
This commit is contained in:
parent
25d9341df0
commit
3885365757
|
@ -38,14 +38,17 @@ func mockBackendExpiration(t testing.TB, backend physical.Backend) (*Core, *Expi
|
||||||
func TestExpiration_Tidy(t *testing.T) {
|
func TestExpiration_Tidy(t *testing.T) {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
exp := mockExpiration(t)
|
|
||||||
|
|
||||||
// We use this later for tidy testing where we need to check the output
|
// We use this later for tidy testing where we need to check the output
|
||||||
logOut := new(bytes.Buffer)
|
logOut := new(bytes.Buffer)
|
||||||
logger := log.New(&log.LoggerOptions{
|
logger := log.New(&log.LoggerOptions{
|
||||||
Output: logOut,
|
Output: logOut,
|
||||||
})
|
})
|
||||||
exp.logger = logger
|
|
||||||
|
testCore := TestCore(t)
|
||||||
|
testCore.logger = logger
|
||||||
|
testCoreUnsealed(t, testCore)
|
||||||
|
|
||||||
|
exp := testCore.expiration
|
||||||
|
|
||||||
if err := exp.Restore(nil); err != nil {
|
if err := exp.Restore(nil); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
|
Loading…
Reference in a new issue