engine/test: Rework StorageEngine
's test utils #1494
2 changed files with 2 additions and 11 deletions
|
@ -49,11 +49,7 @@ func TestDeleteBigObject(t *testing.T) {
|
||||||
link.SetSplitID(splitID)
|
link.SetSplitID(splitID)
|
||||||
link.SetChildren(childIDs...)
|
link.SetChildren(childIDs...)
|
||||||
|
|
||||||
s1 := testNewShard(t)
|
e := testNewEngine(t).setShardsNum(t, 3).engine
|
||||||
s2 := testNewShard(t)
|
|
||||||
s3 := testNewShard(t)
|
|
||||||
|
|
||||||
e := testNewEngine(t).setInitializedShards(t, s1, s2, s3).engine
|
|
||||||
e.log = test.NewLogger(t)
|
e.log = test.NewLogger(t)
|
||||||
defer e.Close(context.Background())
|
defer e.Close(context.Background())
|
||||||
|
|
||||||
|
|
|
@ -43,12 +43,7 @@ func BenchmarkExists(b *testing.B) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func benchmarkExists(b *testing.B, shardNum int) {
|
func benchmarkExists(b *testing.B, shardNum int) {
|
||||||
shards := make([]*shard.Shard, shardNum)
|
e := testNewEngine(b).setShardsNum(b, shardNum).engine
|
||||||
for i := range shardNum {
|
|
||||||
shards[i] = testNewShard(b)
|
|
||||||
}
|
|
||||||
|
|
||||||
e := testNewEngine(b).setInitializedShards(b, shards...).engine
|
|
||||||
defer func() { require.NoError(b, e.Close(context.Background())) }()
|
defer func() { require.NoError(b, e.Close(context.Background())) }()
|
||||||
|
|
||||||
addr := oidtest.Address()
|
addr := oidtest.Address()
|
||||||
|
|
Loading…
Reference in a new issue