forked from TrueCloudLab/frostfs-node
[#920] tests: Fix data races
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
e42262a863
commit
f5160b27fc
3 changed files with 37 additions and 0 deletions
|
@ -20,6 +20,9 @@ func TestRebalance(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
te := newEngineWithErrorThreshold(t, "", 0)
|
||||
defer func() {
|
||||
require.NoError(t, te.ng.Close(context.Background()))
|
||||
}()
|
||||
|
||||
const (
|
||||
objCount = 20
|
||||
|
@ -106,6 +109,9 @@ func TestRebalanceSingleThread(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
te := newEngineWithErrorThreshold(t, "", 0)
|
||||
defer func() {
|
||||
require.NoError(t, te.ng.Close(context.Background()))
|
||||
}()
|
||||
|
||||
obj := testutil.GenerateObjectWithCID(cidtest.ID())
|
||||
obj.SetPayload(make([]byte, errSmallSize))
|
||||
|
@ -153,6 +159,9 @@ type deleteEvent struct {
|
|||
|
||||
func TestRebalanceExitByContext(t *testing.T) {
|
||||
te := newEngineWithErrorThreshold(t, "", 0)
|
||||
defer func() {
|
||||
require.NoError(t, te.ng.Close(context.Background()))
|
||||
}()
|
||||
|
||||
objects := make([]*objectSDK.Object, 4)
|
||||
for i := range objects {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue