File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 6
6
<p align =" center " style =" margin-top :3rem " ><a href =" https://github.com/go-resty/resty/actions/workflows/ci.yml?query=branch%3Av3 " target =" _blank " ><img src =" https://github.com/go-resty/resty/actions/workflows/ci.yml/badge.svg?branch=v3 " alt =" Resty Build Status " >
7
7
</a ><a href =" https://app.codecov.io/gh/go-resty/resty/tree/v3 " target =" _blank " ><img src =" https://codecov.io/gh/go-resty/resty/branch/v3/graph/badge.svg " alt =" Resty Code Coverage " >
8
8
</a ><a href =" https://goreportcard.com/report/resty.dev/v3 " target =" _blank " ><img src =" https://goreportcard.com/badge/resty.dev/v3 " alt =" Go Report Card " >
9
- </a ><a href =" https://github.com/go-resty/resty/releases/latest " target =" _blank " ><img src =" https://img.shields.io/badge/version-v3.0.0--alpha.5-blue.svg " alt =" Resty Release Version " >
10
9
</a ><a href =" https://pkg.go.dev/resty.dev/v3 " target =" _blank " ><img src =" https://pkg.go.dev/badge/resty.dev/v3 " alt =" Resty GoDoc " >
11
10
</a ><a href =" LICENSE " ><img src =" https://img.shields.io/github/license/go-resty/resty.svg " alt =" License " ></a > <a href =" https://github.com/avelino/awesome-go " target =" _blank " ><img src =" https://awesome.re/mentioned-badge.svg " alt =" Mentioned in Awesome Go " ></a ></p >
12
11
<p align =" center " style =" margin-bottom :1rem " ><a href =" https://app.fossa.com/projects/git%2Bgithub.com%2Fgo-resty%2Fresty?ref=badge_shield& ; issueType=license " alt =" FOSSA Status " ><img src =" https://app.fossa.com/api/projects/git%2Bgithub.com%2Fgo-resty%2Fresty.svg?type=shield& ; issueType=license " ></a >
Original file line number Diff line number Diff line change @@ -1465,7 +1465,7 @@ func TestClientCircuitBreaker(t *testing.T) {
1465
1465
1466
1466
failThreshold := uint32 (2 )
1467
1467
successThreshold := uint32 (1 )
1468
- timeout := 500 * time .Millisecond
1468
+ timeout := 100 * time .Millisecond
1469
1469
1470
1470
cb := NewCircuitBreaker ().
1471
1471
SetTimeout (timeout ).
@@ -1484,14 +1484,14 @@ func TestClientCircuitBreaker(t *testing.T) {
1484
1484
assertNil (t , resp )
1485
1485
assertEqual (t , circuitBreakerStateOpen , c .circuitBreaker .getState ())
1486
1486
1487
- time .Sleep (timeout + 1 * time .Millisecond )
1487
+ time .Sleep (timeout + 50 * time .Millisecond )
1488
1488
assertEqual (t , circuitBreakerStateHalfOpen , c .circuitBreaker .getState ())
1489
1489
1490
1490
_ , err = c .R ().Get (ts .URL + "/500" )
1491
1491
assertError (t , err )
1492
1492
assertEqual (t , circuitBreakerStateOpen , c .circuitBreaker .getState ())
1493
1493
1494
- time .Sleep (timeout + 1 * time .Millisecond )
1494
+ time .Sleep (timeout + 50 * time .Millisecond )
1495
1495
assertEqual (t , circuitBreakerStateHalfOpen , c .circuitBreaker .getState ())
1496
1496
1497
1497
for i := uint32 (0 ); i < successThreshold ; i ++ {
You can’t perform that action at this time.
0 commit comments