Don't fail on the batch at the first error (#1826)

This commit is contained in:
Nate Brown
2026-07-27 14:43:30 -05:00
committed by GitHub
parent 6bf424f749
commit 88872a8433
14 changed files with 155 additions and 58 deletions
+2 -2
View File
@@ -79,11 +79,11 @@ func TestWriteBatchNoAllocs(t *testing.T) {
t.Helper()
var werr error
// Warm-up outside the measured runs.
if err := tx.WriteBatch(bufs, addrs, ecns); err != nil {
if _, err := tx.WriteBatch(bufs, addrs, ecns); err != nil {
t.Fatalf("WriteBatch warm-up: %v", err)
}
allocs := testing.AllocsPerRun(100, func() {
if err := tx.WriteBatch(bufs, addrs, ecns); err != nil {
if _, err := tx.WriteBatch(bufs, addrs, ecns); err != nil {
werr = err
}
})