File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -284,18 +284,24 @@ func TestServerPreparedStatements(t *testing.T) {
284
284
var c0 , c1 , pk uint64
285
285
var rowNum int
286
286
for rows .Next () {
287
- if err := rows .Scan (& c0 , & c1 , & pk ); err != nil {
287
+ err := rows .Scan (& c0 , & c1 , & pk )
288
+ require .NoError (t , err )
289
+ if err != nil {
288
290
return false , err
289
291
}
292
+ require .Less (t , rowNum , len (expectedRows ))
290
293
if rowNum >= len (expectedRows ) {
291
294
return false , nil
292
295
}
296
+ require .Equal (t , c0 , expectedRows [rowNum ].([]uint64 )[0 ])
293
297
if c0 != expectedRows [rowNum ].([]uint64 )[0 ] {
294
298
return false , nil
295
299
}
300
+ require .Equal (t , c1 , expectedRows [rowNum ].([]uint64 )[1 ])
296
301
if c1 != expectedRows [rowNum ].([]uint64 )[1 ] {
297
302
return false , nil
298
303
}
304
+ require .Equal (t , pk , expectedRows [rowNum ].([]uint64 )[2 ])
299
305
if pk != expectedRows [rowNum ].([]uint64 )[2 ] {
300
306
return false , nil
301
307
}
You can’t perform that action at this time.
0 commit comments