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

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


The following commit(s) were added to refs/heads/main by this push:
     new 29612798 fix: set timeout as 10s
29612798 is described below

commit 2961279873e49f1c43813c1f8808abf00147462c
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 b81a4151..4708b8fc 100644
--- a/plugins/helper/api_client.go
+++ b/plugins/helper/api_client.go
@@ -75,7 +75,7 @@ func NewApiClient(
        if err != nil {
                return nil, errors.Default.New("Failed to resolve Port")
        }
-       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, errors.Default.Wrap(err, "Failed to connect")
        }
diff --git a/plugins/tapd/api/connection.go b/plugins/tapd/api/connection.go
index 0195f3f9..31d54099 100644
--- a/plugins/tapd/api/connection.go
+++ b/plugins/tapd/api/connection.go
@@ -54,7 +54,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