mirror of https://github.com/milvus-io/milvus.git
20 lines
337 B
Go
20 lines
337 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))
|
|
|
|
segCache.Remove(UniqueID(0))
|
|
assert.False(t, segCache.checkIfCached(0))
|
|
}
|