mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 19:08:30 +08:00
73463d030d
Signed-off-by: longjiquan <jiquan.long@zilliz.com> Signed-off-by: longjiquan <jiquan.long@zilliz.com>
22 lines
494 B
Go
22 lines
494 B
Go
package rootcoord
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/milvus-io/milvus/api/commonpb"
|
|
|
|
"github.com/milvus-io/milvus/internal/proto/proxypb"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func Test_expireCacheConfig_apply(t *testing.T) {
|
|
c := defaultExpireCacheConfig()
|
|
req := &proxypb.InvalidateCollMetaCacheRequest{}
|
|
c.apply(req)
|
|
assert.Nil(t, req.GetBase())
|
|
opt := expireCacheWithDropFlag()
|
|
opt(&c)
|
|
c.apply(req)
|
|
assert.Equal(t, commonpb.MsgType_DropCollection, req.GetBase().GetMsgType())
|
|
}
|