File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ package crossks_test
1717import (
1818 "context"
1919 "testing"
20+ "time"
2021
2122 "github.com/pingcap/errors"
2223 "github.com/pingcap/kvproto/pkg/keyspacepb"
@@ -235,9 +236,11 @@ func TestManager(t *testing.T) {
235236 })
236237 require .EqualValues (t , 1 , tableIDCount )
237238 require .True (t , coordinator .ContainsInternalSession (se ))
238- require .EqualValues (t , 1 , coordinator .InternalSessionCount ())
239+ require .GreaterOrEqual (t , coordinator .InternalSessionCount (), 1 )
239240 return nil
240241 }))
241- require .Zero (t , coordinator .InternalSessionCount ())
242+ require .Eventually (t , func () bool {
243+ return coordinator .InternalSessionCount () == 0
244+ }, 10 * time .Second , 20 * time .Millisecond )
242245 })
243246}
You can’t perform that action at this time.
0 commit comments