@@ -63,14 +63,14 @@ func TestChainWorker(t *testing.T) {
63
63
sch := New (pge , log .Init (config.LoggingOpts {LogLevel : "error" }))
64
64
chains := make (chan Chain , 16 )
65
65
66
- t .Run ("Check chainWorker if context cancelled" , func (t * testing.T ) {
66
+ t .Run ("Check chainWorker if context cancelled" , func (* testing.T ) {
67
67
ctx , cancel := context .WithCancel (context .Background ())
68
68
cancel ()
69
69
chains <- Chain {}
70
70
sch .chainWorker (ctx , chains )
71
71
})
72
72
73
- t .Run ("Check chainWorker if everything fine" , func (t * testing.T ) {
73
+ t .Run ("Check chainWorker if everything fine" , func (* testing.T ) {
74
74
ctx , cancel := context .WithTimeout (context .Background (), 5 * time .Second )
75
75
defer cancel ()
76
76
mock .ExpectQuery ("SELECT count" ).WillReturnError (pgx .ErrNoRows )
@@ -82,7 +82,7 @@ func TestChainWorker(t *testing.T) {
82
82
sch .chainWorker (ctx , chains )
83
83
})
84
84
85
- t .Run ("Check chainWorker if cannot proceed with chain execution" , func (t * testing.T ) {
85
+ t .Run ("Check chainWorker if cannot proceed with chain execution" , func (* testing.T ) {
86
86
ctx , cancel := context .WithTimeout (context .Background (), pgengine .WaitTime + 2 )
87
87
defer cancel ()
88
88
mock .ExpectQuery ("SELECT count" ).WillReturnError (errors .New ("expected" ))
@@ -130,13 +130,13 @@ func TestExecuteOnErrorHandler(t *testing.T) {
130
130
assert .NoError (t , mock .ExpectationsWereMet ())
131
131
})
132
132
133
- t .Run ("check error handler if context cancelled" , func (t * testing.T ) {
133
+ t .Run ("check error handler if context cancelled" , func (* testing.T ) {
134
134
ctx , cancel := context .WithCancel (context .Background ())
135
135
cancel ()
136
136
sch .executeOnErrorHandler (ctx , c )
137
137
})
138
138
139
- t .Run ("check error handler if error" , func (t * testing.T ) {
139
+ t .Run ("check error handler if error" , func (* testing.T ) {
140
140
mock .ExpectExec ("FOO" ).WillReturnError (errors .New ("Syntax error near FOO" ))
141
141
sch .executeOnErrorHandler (context .Background (), c )
142
142
})
0 commit comments