milvus/internal/distributed/utils/util_test.go

21 lines
327 B
Go
Raw Normal View History

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)
}