Fix datarace in writecache tests #548
1 changed files with 2 additions and 5 deletions
|
@ -64,8 +64,9 @@ func TestFlush(t *testing.T) {
|
|||
WithMetabase(mb),
|
||||
WithBlobstor(bs),
|
||||
}, opts...)...)
|
||||
t.Cleanup(func() { require.NoError(t, wc.Close()) })
|
||||
require.NoError(t, wc.Open(false))
|
||||
initWC(t, wc)
|
||||
require.NoError(t, wc.Init())
|
||||
|
||||
// First set mode for metabase and blobstor to prevent background flushes.
|
||||
require.NoError(t, mb.SetMode(mode.ReadOnly))
|
||||
|
@ -229,10 +230,6 @@ func newObject(t *testing.T, size int) (*objectSDK.Object, []byte) {
|
|||
return obj, data
|
||||
}
|
||||
|
||||
func initWC(t *testing.T, wc Cache) {
|
||||
require.NoError(t, wc.Init())
|
||||
}
|
||||
|
||||
type dummyEpoch struct{}
|
||||
|
||||
func (dummyEpoch) CurrentEpoch() uint64 {
|
||||
|
|
Loading…
Reference in a new issue