From 02a4702f53105f95eecc175f08d7bfb9de3ef6b2 Mon Sep 17 00:00:00 2001 From: liuxiran Date: Fri, 25 Dec 2020 03:28:45 -0600 Subject: [PATCH] fix: be consumer e2e test ci failed in pr#999 (#1118) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: be consumer e2e test ci failed in pr#999 * fix: online debug sleep Co-authored-by: 琚致远 --- api/test/e2e/consumer_test.go | 4 ++-- api/test/e2e/route_online_debug_test.go | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/test/e2e/consumer_test.go b/api/test/e2e/consumer_test.go index 2edfdf372d..10327060b4 100644 --- a/api/test/e2e/consumer_test.go +++ b/api/test/e2e/consumer_test.go @@ -88,7 +88,6 @@ func TestConsumer_Create_And_Get(t *testing.T) { Headers: map[string]string{"Authorization": token}, ExpectStatus: http.StatusOK, ExpectBody: "\"code\":0", - Sleep: sleepTime, }, { Desc: "get consumer", @@ -98,6 +97,7 @@ func TestConsumer_Create_And_Get(t *testing.T) { Headers: map[string]string{"Authorization": token}, ExpectStatus: http.StatusOK, ExpectBody: "\"username\":\"consumer_2\"", + Sleep: sleepTime, }, { Desc: "create consumer without username", @@ -179,7 +179,6 @@ func TestConsumer_Update_And_Get(t *testing.T) { Headers: map[string]string{"Authorization": token}, ExpectStatus: http.StatusOK, ExpectBody: "\"code\":0", - Sleep: sleepTime, }, { Desc: "get consumer", @@ -189,6 +188,7 @@ func TestConsumer_Update_And_Get(t *testing.T) { Headers: map[string]string{"Authorization": token}, ExpectStatus: http.StatusOK, ExpectBody: "\"rejected_code\":504", + Sleep: sleepTime, }, { Desc: "delete consumer", diff --git a/api/test/e2e/route_online_debug_test.go b/api/test/e2e/route_online_debug_test.go index e8fc679acb..4796d20fb6 100644 --- a/api/test/e2e/route_online_debug_test.go +++ b/api/test/e2e/route_online_debug_test.go @@ -63,6 +63,7 @@ func TestRoute_Online_Debug_Route_With_Query_Params(t *testing.T) { Path: "/hello", ExpectStatus: http.StatusNotFound, ExpectBody: "{\"error_msg\":\"404 Route Not Found\"}\n", + Sleep: sleepTime, }, { Desc: "create route with query params", @@ -86,7 +87,6 @@ func TestRoute_Online_Debug_Route_With_Query_Params(t *testing.T) { }`, Headers: map[string]string{"Authorization": token}, ExpectStatus: http.StatusOK, - Sleep: sleepTime, }, { Desc: "online debug route with query params", @@ -100,6 +100,7 @@ func TestRoute_Online_Debug_Route_With_Query_Params(t *testing.T) { }`, Headers: map[string]string{"Authorization": token}, ExpectStatus: http.StatusOK, + Sleep: sleepTime, }, { Desc: "delete route",