mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 12:29:36 +08:00
6539a5ae2c
Signed-off-by: yah01 <yah2er0ne@outlook.com>
21 lines
327 B
Go
21 lines
327 B
Go
package utils
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"google.golang.org/grpc"
|
|
|
|
"github.com/milvus-io/milvus/pkg/util/paramtable"
|
|
)
|
|
|
|
func TestGracefulStopGrpcServer(t *testing.T) {
|
|
paramtable.Init()
|
|
|
|
// expected close by gracefulStop
|
|
s1 := grpc.NewServer()
|
|
GracefulStopGRPCServer(s1)
|
|
|
|
// expected not panic
|
|
GracefulStopGRPCServer(nil)
|
|
}
|