From 90cea61c321ec73d9c1c3984897aaa61954cf570 Mon Sep 17 00:00:00 2001 From: "lilong.129" Date: Wed, 19 Apr 2023 16:20:56 +0800 Subject: [PATCH] fix unittest TestRunCaseWithTimeout --- hrp/step_request_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hrp/step_request_test.go b/hrp/step_request_test.go index 04970ea7..7172bf66 100644 --- a/hrp/step_request_test.go +++ b/hrp/step_request_test.go @@ -164,7 +164,7 @@ func TestRunCaseWithTimeout(t *testing.T) { // global timeout testcase1 := &TestCase{ Config: NewConfig("TestCase1"). - SetTimeout(2 * time.Second). // set global timeout to 2s + SetTimeout(10 * time.Second). // set global timeout to 10s SetBaseURL("https://httpbin.org"), TestSteps: []IStep{ NewStep("step1"). @@ -180,11 +180,11 @@ func TestRunCaseWithTimeout(t *testing.T) { testcase2 := &TestCase{ Config: NewConfig("TestCase2"). - SetTimeout(2 * time.Second). // set global timeout to 2s + SetTimeout(10 * time.Second). // set global timeout to 10s SetBaseURL("https://httpbin.org"), TestSteps: []IStep{ NewStep("step1"). - GET("/delay/3"). + GET("/delay/11"). Validate(). AssertEqual("status_code", 200, "check status code"), }, @@ -197,12 +197,12 @@ func TestRunCaseWithTimeout(t *testing.T) { // step timeout testcase3 := &TestCase{ Config: NewConfig("TestCase3"). - SetTimeout(2 * time.Second). + SetTimeout(10 * time.Second). SetBaseURL("https://httpbin.org"), TestSteps: []IStep{ NewStep("step2"). - GET("/delay/3"). - SetTimeout(4*time.Second). // set step timeout to 4s + GET("/delay/11"). + SetTimeout(15*time.Second). // set step timeout to 4s Validate(). AssertEqual("status_code", 200, "check status code"), },