@@ -46,7 +46,7 @@ func TestAsTerminalError(t *testing.T) {
46
46
t .Run ("node drain marked as job retry" , func (t * testing.T ) {
47
47
cause := errors .New ("some error happened" )
48
48
termErr := changefeedbase .AsTerminalError (context .Background (), nodeIsDraining , cause )
49
- require .Contains (t , cause .Error (), termErr .Error ())
49
+ require .Contains (t , termErr .Error (), cause .Error ())
50
50
require .True (t , jobs .IsRetryJobError (termErr ))
51
51
})
52
52
@@ -55,19 +55,19 @@ func TestAsTerminalError(t *testing.T) {
55
55
cause := changefeedbase .WithTerminalError (
56
56
changefeedbase .MarkRetryableError (errors .New ("confusing error" )))
57
57
termErr := changefeedbase .AsTerminalError (context .Background (), nodeIsNotDraining , cause )
58
- require .Contains (t , cause .Error (), termErr .Error ())
58
+ require .Contains (t , termErr .Error (), cause .Error ())
59
59
})
60
60
61
61
t .Run ("assertion failures are terminal" , func (t * testing.T ) {
62
62
// Assertion failures are terminal, even if marked as retry-able.
63
63
cause := changefeedbase .MarkRetryableError (errors .AssertionFailedf ("though shall not pass" ))
64
64
termErr := changefeedbase .AsTerminalError (context .Background (), nodeIsNotDraining , cause )
65
- require .Contains (t , cause .Error (), termErr .Error ())
65
+ require .Contains (t , termErr .Error (), cause .Error ())
66
66
})
67
67
68
68
t .Run ("gc error is terminal" , func (t * testing.T ) {
69
69
cause := changefeedbase .MarkRetryableError (& kvpb.BatchTimestampBeforeGCError {})
70
70
termErr := changefeedbase .AsTerminalError (context .Background (), nodeIsNotDraining , cause )
71
- require .Contains (t , cause .Error (), termErr .Error ())
71
+ require .Contains (t , termErr .Error (), cause .Error ())
72
72
})
73
73
}
0 commit comments