Skip to content

Commit 42da97e

Browse files
committed
Update server_engine_test to use require.
1 parent 28dd77f commit 42da97e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

enginetest/server_engine_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,18 +284,24 @@ func TestServerPreparedStatements(t *testing.T) {
284284
var c0, c1, pk uint64
285285
var rowNum int
286286
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 {
288290
return false, err
289291
}
292+
require.Less(t, rowNum, len(expectedRows))
290293
if rowNum >= len(expectedRows) {
291294
return false, nil
292295
}
296+
require.Equal(t, c0, expectedRows[rowNum].([]uint64)[0])
293297
if c0 != expectedRows[rowNum].([]uint64)[0] {
294298
return false, nil
295299
}
300+
require.Equal(t, c1, expectedRows[rowNum].([]uint64)[1])
296301
if c1 != expectedRows[rowNum].([]uint64)[1] {
297302
return false, nil
298303
}
304+
require.Equal(t, pk, expectedRows[rowNum].([]uint64)[2])
299305
if pk != expectedRows[rowNum].([]uint64)[2] {
300306
return false, nil
301307
}

0 commit comments

Comments
 (0)