mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-01 11:29:48 +08:00
dea0a4e522
Signed-off-by: yangxuan <xuan.yang@zilliz.com>
17 lines
262 B
Go
17 lines
262 B
Go
package datanode
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestSegmentCache(t *testing.T) {
|
|
segCache := newCache()
|
|
|
|
assert.False(t, segCache.checkIfCached(0))
|
|
|
|
segCache.Cache(UniqueID(0))
|
|
assert.True(t, segCache.checkIfCached(0))
|
|
}
|