Skip to content

Commit

Permalink
test: add test cases for mixed retry
Browse files Browse the repository at this point in the history
  • Loading branch information
YangruiEmma committed Aug 27, 2024
1 parent 2b8b6ba commit 2fdd04f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions thriftrpc/retrycall/mixedretry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,12 @@ var controlErrMW = func(next endpoint.Endpoint) endpoint.Endpoint {
ctx = metainfo.WithValue(ctx, sleepTimeMsKey, "250") //ms
retryCount, exit := rpcinfo.GetRPCInfo(ctx).To().Tag(rpcinfo.RetryTag)
if !exit {
ctx = metainfo.WithValue(ctx, respFlagMsgKey, retryMsg) //ms
ctx = metainfo.WithValue(ctx, respFlagMsgKey, retryMsg)
} else {
if retryCount == "2" {
ctx = metainfo.WithValue(ctx, respFlagMsgKey, "0") //ms
ctx = metainfo.WithValue(ctx, respFlagMsgKey, "0")
} else {
ctx = metainfo.WithValue(ctx, respFlagMsgKey, retryMsg) //ms
ctx = metainfo.WithValue(ctx, respFlagMsgKey, retryMsg)
}
}
err = next(ctx, args, result)
Expand Down

0 comments on commit 2fdd04f

Please sign in to comment.