Fix flake.

This commit is contained in:
Nuno Cruces
2025-04-08 12:41:46 +01:00
parent 73ac7e06f6
commit 1b0bf3495e
3 changed files with 7 additions and 5 deletions

View File

@@ -287,8 +287,9 @@ func TestConn_Transaction_busy(t *testing.T) {
go cancel()
_, err = db2.BeginExclusive()
if !errors.Is(err, sqlite3.BUSY) && !errors.Is(err, sqlite3.INTERRUPT) {
t.Errorf("got %v, want sqlite3.BUSY or sqlite3.INTERRUPT", err)
var terr interface{ Temporary() bool }
if !errors.As(err, &terr) || !terr.Temporary() {
t.Errorf("got %v, want temporary", err)
}
err = nil