mirror of https://github.com/milvus-io/milvus.git
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)
|
|
}
|