From 651ddd3560c8b6ec2c8e7290f198ce6ad8c97b9c Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Wed, 18 Mar 2020 09:26:52 -0700 Subject: Reduce CPU usage when --timeout=0 * Add second go routine for when a Timer is not needed. * goimports updated some project files Fixes #5531 Signed-off-by: Jhon Honce --- pkg/bindings/test/common_test.go | 2 +- pkg/bindings/test/volumes_test.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'pkg/bindings/test') diff --git a/pkg/bindings/test/common_test.go b/pkg/bindings/test/common_test.go index a4d065a14..5cd8f7e4f 100644 --- a/pkg/bindings/test/common_test.go +++ b/pkg/bindings/test/common_test.go @@ -152,7 +152,7 @@ func (b *bindingTest) startAPIService() *gexec.Session { var ( cmd []string ) - cmd = append(cmd, "--log-level=debug", "system", "service", "--timeout=999999", b.sock) + cmd = append(cmd, "--log-level=debug", "system", "service", "--timeout=0", b.sock) return b.runPodman(cmd) } diff --git a/pkg/bindings/test/volumes_test.go b/pkg/bindings/test/volumes_test.go index c8940d46e..b1a742c43 100644 --- a/pkg/bindings/test/volumes_test.go +++ b/pkg/bindings/test/volumes_test.go @@ -3,11 +3,12 @@ package test_bindings import ( "context" "fmt" + "net/http" + "time" + "github.com/containers/libpod/pkg/api/handlers" "github.com/containers/libpod/pkg/bindings/containers" "github.com/containers/libpod/pkg/bindings/volumes" - "net/http" - "time" "github.com/containers/libpod/pkg/bindings" . "github.com/onsi/ginkgo" -- cgit v1.2.3-54-g00ecf