[#145] shard-gc: Expired locked unit test

Added unit test that verifies that GC deletes expired
locked objects in one epoch.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-03-17 10:56:37 +03:00
parent 9cd8f7cea0
commit 6c4a1699ef
2 changed files with 125 additions and 2 deletions

View file

@ -27,10 +27,12 @@ import (
"go.uber.org/zap/zaptest"
)
type epochState struct{}
type epochState struct {
Value uint64
}
func (s epochState) CurrentEpoch() uint64 {
return 0
return s.Value
}
func newShard(t testing.TB, enableWriteCache bool) *shard.Shard {