diff --git a/internal/indexnode/indexnode_test.go b/internal/indexnode/indexnode_test.go index 72a93c6d5f..dac97e7bd2 100644 --- a/internal/indexnode/indexnode_test.go +++ b/internal/indexnode/indexnode_test.go @@ -443,6 +443,8 @@ func TestIndexNode(t *testing.T) { zap.String("resp", resp.Response), zap.String("name", resp.ComponentName)) }) + err = in.etcdKV.RemoveWithPrefix("session/IndexNode") + assert.Nil(t, err) err = in.Stop() assert.Nil(t, err) @@ -718,6 +720,9 @@ func TestCreateIndexFailed(t *testing.T) { assert.Equal(t, commonpb.ErrorCode_UnexpectedError, status.ErrorCode) }) + err = in.etcdKV.RemoveWithPrefix("session/IndexNode") + assert.Nil(t, err) + err = in.Stop() assert.Nil(t, err) } @@ -767,6 +772,9 @@ func TestIndexNode_Error(t *testing.T) { assert.Equal(t, commonpb.ErrorCode_UnexpectedError, resp.Status.ErrorCode) }) + err = in.etcdKV.RemoveWithPrefix("session/IndexNode") + assert.Nil(t, err) + err = in.Stop() assert.Nil(t, err) }