mirror of https://github.com/milvus-io/milvus.git
Fix tSafe replica unit test (#12325)
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>pull/12329/head
parent
8cd1fccfb1
commit
cad61ea47e
|
@ -13,7 +13,6 @@ package querynode
|
|||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
@ -29,7 +28,7 @@ func TestTSafeReplica_valid(t *testing.T) {
|
|||
timestamp := Timestamp(1000)
|
||||
err = replica.setTSafe(defaultVChannel, defaultCollectionID, timestamp)
|
||||
assert.NoError(t, err)
|
||||
time.Sleep(20 * time.Millisecond)
|
||||
<-watcher.watcherChan()
|
||||
resT, err := replica.getTSafe(defaultVChannel)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, timestamp, resT)
|
||||
|
@ -49,7 +48,7 @@ func TestTSafeReplica_invalid(t *testing.T) {
|
|||
timestamp := Timestamp(1000)
|
||||
err = replica.setTSafe(defaultVChannel, defaultCollectionID, timestamp)
|
||||
assert.NoError(t, err)
|
||||
time.Sleep(20 * time.Millisecond)
|
||||
<-watcher.watcherChan()
|
||||
resT, err := replica.getTSafe(defaultVChannel)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, timestamp, resT)
|
||||
|
|
Loading…
Reference in New Issue