@@ -31,6 +31,7 @@ func TestDoAllFailed(t *testing.T) {
3131#8: test
3232#9: test
3333#10: test`
34+ assert .Len (t , err , 10 )
3435 assert .Equal (t , expectedErrorFormat , err .Error (), "retry error format" )
3536 assert .Equal (t , uint (45 ), retrySum , "right count of retry" )
3637}
@@ -68,6 +69,7 @@ func TestRetryIf(t *testing.T) {
6869#1: test
6970#2: test
7071#3: special`
72+ assert .Len (t , err , 3 )
7173 assert .Equal (t , expectedErrorFormat , err .Error (), "retry error format" )
7274 assert .Equal (t , uint (2 ), retryCount , "right count of retry" )
7375
@@ -164,7 +166,7 @@ func TestLastErrorOnly(t *testing.T) {
164166func TestUnrecoverableError (t * testing.T ) {
165167 attempts := 0
166168 testErr := errors .New ("error" )
167- expectedErr := Error {testErr , nil }
169+ expectedErr := Error {testErr }
168170 err := Do (
169171 func () error {
170172 attempts ++
@@ -367,6 +369,7 @@ func TestContext(t *testing.T) {
367369#1: test
368370#2: test
369371#3: context canceled`
372+ assert .Len (t , err , 3 )
370373 assert .Equal (t , expectedErrorFormat , err .Error (), "retry error format" )
371374 assert .Equal (t , 2 , retrySum , "called at most once" )
372375 })
0 commit comments