From a2f76141f068b56ef7c1130492fc6f11beecca3f Mon Sep 17 00:00:00 2001 From: Steven Ferrer Date: Sat, 26 Oct 2024 18:03:56 +0800 Subject: [PATCH] Update kv/server/server_test.go - Assert nil error on `TestRawPut1` - Move `it.Close()` after assert nil error on `TestIterWithRawDelete1` --- kv/server/server_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kv/server/server_test.go b/kv/server/server_test.go index 0c2cf10d0..846b17f96 100644 --- a/kv/server/server_test.go +++ b/kv/server/server_test.go @@ -101,6 +101,7 @@ func TestRawPut1(t *testing.T) { } _, err := server.RawPut(nil, req) + assert.Nil(t, err) got, err := Get(s, cf, []byte{99}) assert.Nil(t, err) @@ -327,8 +328,8 @@ func TestIterWithRawDelete1(t *testing.T) { assert.Nil(t, Set(s, cf, []byte{4}, []byte{233, 4})) it, err := Iter(s, cf) - defer it.Close() assert.Nil(t, err) + defer it.Close() delete := &kvrpcpb.RawDeleteRequest{ Key: []byte{3},