mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
Fix flake.
This commit is contained in:
@@ -249,8 +249,9 @@ func Test_nested_context(t *testing.T) {
|
|||||||
cancel()
|
cancel()
|
||||||
|
|
||||||
var terr interface{ Temporary() bool }
|
var terr interface{ Temporary() bool }
|
||||||
if inner.Next() || !errors.As(inner.Err(), &terr) || !terr.Temporary() {
|
if inner.Next() || !errors.Is(inner.Err(), context.Canceled) &&
|
||||||
t.Fatalf("got %v, want temporary", inner.Err())
|
(!errors.As(inner.Err(), &terr) || !terr.Temporary()) {
|
||||||
|
t.Fatalf("got %v, want cancellation", inner.Err())
|
||||||
}
|
}
|
||||||
|
|
||||||
want(outer, 1)
|
want(outer, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user