Skip to content

Commit

Permalink
fix unittest TestRunCaseWithTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
debugtalk committed Apr 19, 2023
1 parent efa218a commit b08411f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions hrp/step_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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").
Expand All @@ -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"),
},
Expand All @@ -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"),
},
Expand Down

0 comments on commit b08411f

Please sign in to comment.