sqldb: fix GetInvoice call in benchmarks
GetInvoice was removed and replaced with GetInvoiceByHash, GetInvoiceByAddr, etc. Update the sqlite benchmarks to use GetInvoiceByHash instead.
This commit is contained in:
1 file changed
+3
-11
@@ -93,12 +93,7 @@ func BenchmarkSqliteMaxConns(b *testing.B) {
|
|||||||
hash := hashes[i%numInvoices]
|
hash := hashes[i%numInvoices]
|
||||||
i++
|
i++
|
||||||
|
|
||||||
_, err := store.GetInvoice(
|
_, err := store.GetInvoiceByHash(ctx, hash)
|
||||||
ctx,
|
|
||||||
sqlc.GetInvoiceParams{
|
|
||||||
Hash: hash,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
require.ErrorIs(b, err, sql.ErrNoRows)
|
require.ErrorIs(b, err, sql.ErrNoRows)
|
||||||
}
|
}
|
||||||
@@ -182,11 +177,8 @@ func BenchmarkSqliteMaxConnsConcurrentReads(b *testing.B) {
|
|||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
|
|
||||||
hash := hashes[g%numInvoices]
|
hash := hashes[g%numInvoices]
|
||||||
_, err := store.GetInvoice(
|
_, err := store.GetInvoiceByHash(
|
||||||
ctx,
|
ctx, hash,
|
||||||
sqlc.GetInvoiceParams{
|
|
||||||
Hash: hash,
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
if err != nil &&
|
if err != nil &&
|
||||||
err != sql.ErrNoRows {
|
err != sql.ErrNoRows {
|
||||||
|
|||||||
Reference in new issue
Block a user