e2e storage: don't panic when server stops

Now that everything is connected to a per-test context, the gRPC server might
encounter an error before it gets shut down normally. We must not panic in that
case because it would kill the entire Ginkgo worker process. This is not even
an error, so just log it as info message.
This commit is contained in:
Patrick Ohly 2022-10-20 14:57:57 +02:00
parent f897c86119
commit 8c27313cfd

View File

@ -157,7 +157,7 @@ func goServe(server *grpc.Server, wg *sync.WaitGroup, listener net.Listener, sta
started <- true
err := server.Serve(listener)
if err != nil {
panic(err.Error())
klog.Infof("gRPC server for CSI driver stopped: %v", err)
}
}()
}