fix/355-increase-tree-service-client-cache-size #359
1 changed files with 10 additions and 5 deletions
|
@ -12,6 +12,7 @@ import (
|
|||
cidtest "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id/test"
|
||||
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
||||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
||||
func TestWriteCacheObjectLoss(t *testing.T) {
|
||||
|
@ -39,13 +40,17 @@ func TestWriteCacheObjectLoss(t *testing.T) {
|
|||
|
||||
sh := newCustomShard(t, dir, true, wcOpts, nil)
|
||||
|
||||
var putPrm shard.PutPrm
|
||||
|
||||
var errG errgroup.Group
|
||||
for i := range objects {
|
||||
putPrm.SetObject(objects[i])
|
||||
_, err := sh.Put(context.Background(), putPrm)
|
||||
require.NoError(t, err)
|
||||
obj := objects[i]
|
||||
errG.Go(func() error {
|
||||
var putPrm shard.PutPrm
|
||||
putPrm.SetObject(obj)
|
||||
_, err := sh.Put(context.Background(), putPrm)
|
||||
return err
|
||||
})
|
||||
}
|
||||
require.NoError(t, errG.Wait())
|
||||
require.NoError(t, sh.Close())
|
||||
|
||||
sh = newCustomShard(t, dir, true, wcOpts, nil)
|
||||
|
|
Loading…
Reference in a new issue