Merge pull request #10626 from ziggie1984/fix-bench-get-invoice

sqldb: fix GetInvoice call in benchmarks
This commit is contained in:
ziggieXXX authored and GitHub committed 2026-03-04 20:50:46 +01:00
commit 1e433db0ee
1 file changed
+3 -11
+3 -11
View File
@@ -93,12 +93,7 @@ func BenchmarkSqliteMaxConns(b *testing.B) {
hash := hashes[i%numInvoices]
i++
_, err := store.GetInvoice(
ctx,
sqlc.GetInvoiceParams{
Hash: hash,
},
)
_, err := store.GetInvoiceByHash(ctx, hash)
if err != nil {
require.ErrorIs(b, err, sql.ErrNoRows)
}
@@ -182,11 +177,8 @@ func BenchmarkSqliteMaxConnsConcurrentReads(b *testing.B) {
defer wg.Done()
hash := hashes[g%numInvoices]
_, err := store.GetInvoice(
ctx,
sqlc.GetInvoiceParams{
Hash: hash,
},
_, err := store.GetInvoiceByHash(
ctx, hash,
)
if err != nil &&
err != sql.ErrNoRows {