mirror of https://github.com/milvus-io/milvus.git
Fix mock querynode server session not revoked (#17229)
Revoke mock querynode server session when it's stopped This PR reduces the running time of TestLoadBalanceIndexedSegmentsAfterNodeDown from 60+ seconds to less than 1+ seconds Also related to #17212 #17215 Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/17634/head
parent
144f7a2d80
commit
50cecc65ed
|
@ -22,6 +22,7 @@ import (
|
|||
"net"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc"
|
||||
|
@ -172,6 +173,9 @@ func (qs *queryNodeServerMock) start() error {
|
|||
|
||||
func (qs *queryNodeServerMock) stop() error {
|
||||
qs.cancel()
|
||||
if qs.session != nil {
|
||||
qs.session.Revoke(time.Second)
|
||||
}
|
||||
if qs.grpcServer != nil {
|
||||
qs.grpcServer.GracefulStop()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue