From 96cf246cb351cde47f81d6476caad854a206b7b5 Mon Sep 17 00:00:00 2001 From: Denis Makogon Date: Fri, 21 Jul 2017 23:45:05 +0300 Subject: [PATCH] Increase tests timeouts for API tests --- test/fn-api-tests/exec_test.go | 4 ++-- test/fn-api-tests/utils.go | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/fn-api-tests/exec_test.go b/test/fn-api-tests/exec_test.go index 832dce169..687da3c64 100644 --- a/test/fn-api-tests/exec_test.go +++ b/test/fn-api-tests/exec_test.go @@ -109,7 +109,7 @@ func TestRouteExecutions(t *testing.T) { t.Run("run-async-funcy/hello-with-status-check", func(t *testing.T) { callID := CallAsync(t, u, &bytes.Buffer{}) - time.Sleep(time.Second * 2) + time.Sleep(time.Second * 10) cfg := &call.GetCallsCallParams{ Call: callID, Context: s.Context, @@ -247,7 +247,7 @@ func TestRouteExecutions(t *testing.T) { }{Size: 20}) callID := CallAsync(t, u, content) - time.Sleep(5 * time.Second) + time.Sleep(10 * time.Second) cfg := &operations.GetCallsCallLogParams{ Call: callID, diff --git a/test/fn-api-tests/utils.go b/test/fn-api-tests/utils.go index 33ac70a20..988dad553 100644 --- a/test/fn-api-tests/utils.go +++ b/test/fn-api-tests/utils.go @@ -41,6 +41,12 @@ func APIClient() *client.Functions { // create the API client, with the transport client := client.New(transport, strfmt.Default) + _, err := client.Version.GetVersion(nil) + if err != nil { + if Host() != "localhost:8080" { + panic("Cannot reach remote api for functions") + } + } return client }