This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch release-v0.13
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/release-v0.13 by this push:
     new 23550aa1 fix: set timeout as 10s
23550aa1 is described below

commit 23550aa1a1bf14c2e0a0a32c46ac9edf4f24de7a
Author: zhangliang <[email protected]>
AuthorDate: Wed Sep 14 19:34:45 2022 +0800

    fix: set timeout as 10s
---
 plugins/helper/api_client.go   | 2 +-
 plugins/tapd/api/connection.go | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/helper/api_client.go b/plugins/helper/api_client.go
index 2baf0783..63c66ded 100644
--- a/plugins/helper/api_client.go
+++ b/plugins/helper/api_client.go
@@ -77,7 +77,7 @@ func NewApiClient(
        if err != nil {
                return nil, fmt.Errorf("Failed to resolve Port: %w", err)
        }
-       err = utils.CheckNetwork(parsedUrl.Hostname(), port, 
time.Duration(2)*time.Second)
+       err = utils.CheckNetwork(parsedUrl.Hostname(), port, 10*time.Second)
        if err != nil {
                return nil, fmt.Errorf("Failed to connect: %w", err)
        }
diff --git a/plugins/tapd/api/connection.go b/plugins/tapd/api/connection.go
index d3538fa3..f9628364 100644
--- a/plugins/tapd/api/connection.go
+++ b/plugins/tapd/api/connection.go
@@ -59,7 +59,7 @@ func TestConnection(input *core.ApiResourceInput) 
(*core.ApiResourceOutput, erro
                map[string]string{
                        "Authorization": fmt.Sprintf("Basic %s", 
connection.GetEncodedToken()),
                },
-               3*time.Second,
+               10*time.Second,
                connection.Proxy,
                basicRes,
        )

Reply via email to