chore: refactor redis (#3844)

This commit is contained in:
Kevin Wan
2024-01-13 23:02:19 +08:00
committed by GitHub
parent 368caa7608
commit 9e33b557b1
2 changed files with 11 additions and 10 deletions

View File

@@ -138,7 +138,7 @@ func TestFormatError(t *testing.T) {
assert.Equal(t, "context deadline", formatError(context.DeadlineExceeded))
// Test case: err is breaker.ErrServiceUnavailable
assert.Equal(t, "breaker", formatError(breaker.ErrServiceUnavailable))
assert.Equal(t, "breaker open", formatError(breaker.ErrServiceUnavailable))
// Test case: err is unknown
assert.Equal(t, "unexpected error", formatError(errors.New("some error")))