diff --git a/duckdb_test.go b/duckdb_test.go index fde020dc..d9303973 100644 --- a/duckdb_test.go +++ b/duckdb_test.go @@ -1104,12 +1104,12 @@ func TestQueryTimeout(t *testing.T) { db := openDB(t) defer db.Close() - ctx, cancel := context.WithTimeout(context.Background(), time.Second) + ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*250) defer cancel() now := time.Now() _, err := db.ExecContext(ctx, "CREATE TABLE test AS SELECT * FROM range(10000000) t1, range(1000000) t2;") - require.True(t, errors.Is(err, context.DeadlineExceeded)) + require.ErrorIs(t, err, context.DeadlineExceeded) // a very defensive time check, but should be good enough // the query takes much longer than 10 seconds