diff --git a/cmd/sharded-test-server/cache.go b/cmd/sharded-test-server/cache.go index 11385bc630b..f0fd20686c6 100644 --- a/cmd/sharded-test-server/cache.go +++ b/cmd/sharded-test-server/cache.go @@ -20,6 +20,7 @@ import ( "context" "errors" "fmt" + "k8s.io/klog/v2" "net/http" "os" "os/exec" @@ -30,13 +31,11 @@ import ( "github.com/abiosoft/lineprefix" "github.com/fatih/color" - "k8s.io/client-go/tools/clientcmd" - clientcmdapi "k8s.io/client-go/tools/clientcmd/api" - "k8s.io/klog/v2" - "github.com/kcp-dev/kcp/cmd/test-server/helpers" kcpclientset "github.com/kcp-dev/kcp/sdk/client/clientset/versioned/cluster" "github.com/kcp-dev/kcp/test/e2e/framework" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) func startCacheServer(ctx context.Context, logDirPath, workingDir string, syntheticDelay time.Duration) (<-chan error, string, error) { @@ -74,12 +73,12 @@ func startCacheServer(ctx context.Context, logDirPath, workingDir string, synthe } logger := klog.FromContext(ctx) - defer func() { - err = logFile.Close() - if err != nil { - logger.Error(err, "failed to close the log file") - } - }() + // defer func() { + // err = logFile.Close() + // if err != nil { + // logger.Error(err, "failed to close the log file") + // } + // }() writer := helpers.NewHeadWriter(logFile, out) cmd.Stdout = writer diff --git a/cmd/test-server/kcp/shard.go b/cmd/test-server/kcp/shard.go index b03abba2d79..5e4d5d3991e 100644 --- a/cmd/test-server/kcp/shard.go +++ b/cmd/test-server/kcp/shard.go @@ -117,12 +117,12 @@ func (s *Shard) Start(ctx context.Context, quiet bool) error { return err } - defer func() { - err = logFile.Close() - if err != nil { - logger.Error(err, "failed to close the log file") - } - }() + // defer func() { + // err = logFile.Close() + // if err != nil { + // logger.Error(err, "failed to close the log file") + // } + // }() s.writer = helpers.NewHeadWriter(logFile, out) cmd.Stdout = s.writer