mirror of https://github.com/milvus-io/milvus.git
Add ut for GetComponentStates (#12968)
Signed-off-by: dragondriver <jiquan.long@zilliz.com>pull/12975/head
parent
8f2c630434
commit
19ad282810
|
@ -2572,3 +2572,11 @@ func TestProxy_GetComponentStates(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
assert.Equal(t, commonpb.ErrorCode_Success, resp.Status.ErrorCode)
|
||||
}
|
||||
|
||||
func TestProxy_GetComponentStates_state_code(t *testing.T) {
|
||||
p := &Proxy{}
|
||||
p.stateCode.Store("not internalpb.StateCode")
|
||||
states, err := p.GetComponentStates(context.Background())
|
||||
assert.NoError(t, err)
|
||||
assert.NotEqual(t, commonpb.ErrorCode_Success, states.Status.ErrorCode)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue