mirror of https://github.com/milvus-io/milvus.git
parent
93bd786506
commit
85db2c0438
|
@ -13,7 +13,6 @@ on:
|
|||
- docker-compose.yml
|
||||
- Makefile
|
||||
- '!**.md'
|
||||
- '!**_test.go'
|
||||
pull_request:
|
||||
# file paths to consider in the event. Optional; defaults to all.
|
||||
paths:
|
||||
|
@ -24,7 +23,6 @@ on:
|
|||
- docker-compose.yml
|
||||
- Makefile
|
||||
- '!**.md'
|
||||
- '!**_test.go'
|
||||
|
||||
jobs:
|
||||
ubuntu:
|
||||
|
|
|
@ -45,7 +45,7 @@ func (ttBarrier *softTimeTickBarrier) GetTimeTick() (Timestamp, error) {
|
|||
ttBarrier.lastTt = ts
|
||||
|
||||
default:
|
||||
if isEmpty {
|
||||
if isEmpty || ttBarrier.closed {
|
||||
continue
|
||||
}
|
||||
return ttBarrier.lastTt, nil
|
||||
|
|
|
@ -250,6 +250,7 @@ func TestTt_SoftTtBarrierGetTimeTickClose(t *testing.T) {
|
|||
sttbarrier01.Close()
|
||||
}()
|
||||
|
||||
wg1.Wait()
|
||||
ts, err = sttbarrier01.GetTimeTick()
|
||||
assert.NotNil(t, err)
|
||||
assert.Equal(t, Timestamp(0), ts)
|
||||
|
@ -279,15 +280,16 @@ func TestTt_SoftTtBarrierGetTimeTickCancel(t *testing.T) {
|
|||
require.NotNil(t, sttbarrier)
|
||||
|
||||
sttbarrier.Start()
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
|
||||
go func() {
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
defer wg.Done()
|
||||
cancel()
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
sttbarrier.Close()
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
}()
|
||||
|
||||
time.Sleep(20 * time.Millisecond)
|
||||
wg.Wait()
|
||||
|
||||
ts, err := sttbarrier.GetTimeTick()
|
||||
assert.NotNil(t, err)
|
||||
|
|
Loading…
Reference in New Issue