Skip to content

Commit

Permalink
fix: Increase API timeout to 120 seconds (#1655)
Browse files Browse the repository at this point in the history
* chore: Disable flaky tests due to api timeout

Signed-off-by: Lei Jin <lei.jin@lacework.net>

* fix: Increase api timeout limit to 120s

Signed-off-by: Lei Jin <lei.jin@lacework.net>

---------

Signed-off-by: Lei Jin <lei.jin@lacework.net>
  • Loading branch information
leijin-lw authored Sep 6, 2024
1 parent 86ef42a commit a363439
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 1 addition & 3 deletions integration/container_vulnerability_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,7 @@ func TestContainerVulnerabilityCommandScanErrorContainerImageNotFound(t *testing
"EXITCODE is not the expected one")
}

// Disabled due to the api timeout issue
// TODO: re-enable when timeout is fixed
func _TestContainerVulnerabilityCommandScanFailOnSeverity(t *testing.T) {
func TestContainerVulnerabilityCommandScanFailOnSeverity(t *testing.T) {
home := createTOMLConfigFromCIvars()
defer os.RemoveAll(home)
_, err, exitcode := LaceworkCLIWithHome(home,
Expand Down

0 comments on commit a363439

Please sign in to comment.