From 6a06b63554169eab76396f50405a125d7047d68c Mon Sep 17 00:00:00 2001 From: Lucas Severo Alves Date: Tue, 24 Jan 2023 21:49:24 +0100 Subject: [PATCH] comment change from t.Fatal to panic --- cmd/kube-scheduler/app/testing/testserver.go | 2 +- staging/src/k8s.io/cloud-provider/app/testing/testserver.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/kube-scheduler/app/testing/testserver.go b/cmd/kube-scheduler/app/testing/testserver.go index 351e2394fb9..1131561a584 100644 --- a/cmd/kube-scheduler/app/testing/testserver.go +++ b/cmd/kube-scheduler/app/testing/testserver.go @@ -152,7 +152,7 @@ func StartTestServer(ctx context.Context, customFlags []string) (result TestServ return result, nil } -// StartTestServerOrDie calls StartTestServer t.Fatal if it does not succeed. +// StartTestServerOrDie calls StartTestServer panic if it does not succeed. func StartTestServerOrDie(ctx context.Context, flags []string) *TestServer { result, err := StartTestServer(ctx, flags) if err == nil { diff --git a/staging/src/k8s.io/cloud-provider/app/testing/testserver.go b/staging/src/k8s.io/cloud-provider/app/testing/testserver.go index 4e96786defb..e6fd0a9757d 100644 --- a/staging/src/k8s.io/cloud-provider/app/testing/testserver.go +++ b/staging/src/k8s.io/cloud-provider/app/testing/testserver.go @@ -52,6 +52,7 @@ type TestServer struct { // and location of the tmpdir are returned. // // Note: we return a tear-down func instead of a stop channel because the later will leak temporary +// // files that because Golang testing's call to os.Exit will not give a stop channel go routine // enough time to remove temporary files. func StartTestServer(ctx context.Context, customFlags []string) (result TestServer, err error) { @@ -190,7 +191,7 @@ func StartTestServer(ctx context.Context, customFlags []string) (result TestServ return result, nil } -// StartTestServerOrDie calls StartTestServer t.Fatal if it does not succeed. +// StartTestServerOrDie calls StartTestServer panic if it does not succeed. func StartTestServerOrDie(ctx context.Context, flags []string) *TestServer { result, err := StartTestServer(ctx, flags) if err == nil {