From 4067cb5dbfc79af8cb4667ecac02801637c36b17 Mon Sep 17 00:00:00 2001 From: Lei Jin Date: Thu, 5 Sep 2024 23:04:58 +0000 Subject: [PATCH] fix: Increase api timeout limit to 120s Signed-off-by: Lei Jin --- api/client.go | 4 ++-- integration/container_vulnerability_test.go | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/api/client.go b/api/client.go index 95fa7a352..37d41b669 100644 --- a/api/client.go +++ b/api/client.go @@ -36,8 +36,8 @@ import ( ) const ( - defaultTimeout = 60 * time.Second - defaultTLSTimeout = 63 * time.Second + defaultTimeout = 120 * time.Second + defaultTLSTimeout = 123 * time.Second ) type Client struct { diff --git a/integration/container_vulnerability_test.go b/integration/container_vulnerability_test.go index f907d0fb4..f7ab1e620 100644 --- a/integration/container_vulnerability_test.go +++ b/integration/container_vulnerability_test.go @@ -220,9 +220,7 @@ func _TestContainerVulnerabilityCommandScanFailOnSeverity(t *testing.T) { "STDERR doesn't match") } -// Disabled due to the api timeout issue -// TODO: re-enable when timeout is fixed -func _TestContainerVulnerabilityCommandScanFailOnFixable(t *testing.T) { +func TestContainerVulnerabilityCommandScanFailOnFixable(t *testing.T) { home := createTOMLConfigFromCIvars() defer os.RemoveAll(home) _, err, exitcode := LaceworkCLIWithHome(home, @@ -235,9 +233,7 @@ func _TestContainerVulnerabilityCommandScanFailOnFixable(t *testing.T) { "STDERR doesn't match") } -// Disabled due to the api timeout issue -// TODO: re-enable when timeout is fixed -func _TestContainerVulnerabilityCommandScanHumanReadablePollGenerateHtml(t *testing.T) { +func TestContainerVulnerabilityCommandScanHumanReadablePollGenerateHtml(t *testing.T) { // create a temporal directory to check that the HTML file is deployed home := createTOMLConfigFromCIvars() defer os.RemoveAll(home)