[#895] test: Use t.Cleanup only for external resources

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-01-09 16:26:43 +03:00 committed by Evgenii Stratonikov
parent 836818fb75
commit 47dcfa20f3
50 changed files with 164 additions and 95 deletions

View file

@ -114,6 +114,7 @@ func TestErrorReporting(t *testing.T) {
checkShardState(t, te.ng, te.shards[0].id, i, mode.ReadWrite)
checkShardState(t, te.ng, te.shards[1].id, 0, mode.ReadWrite)
}
require.NoError(t, te.ng.Close(context.Background()))
})
t.Run("with error threshold", func(t *testing.T) {
const errThreshold = 3
@ -161,6 +162,7 @@ func TestErrorReporting(t *testing.T) {
require.NoError(t, te.ng.SetShardMode(te.shards[0].id, mode.ReadWrite, true))
checkShardState(t, te.ng, te.shards[0].id, 0, mode.ReadWrite)
require.NoError(t, te.ng.Close(context.Background()))
})
}