Skip to content

Commit

Permalink
Add configurable defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcgr committed Aug 22, 2023
1 parent 8819fbb commit 66c1892
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/code-util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -345,3 +345,6 @@ function get_logging_io()
ctx = IOContext(io, stream)
return io, ctx
end

default_timeout() = parse(Int64, get(ENV, "TEST_REL_TEST_TIMEOUT", "300"))
default_allowed() = Symbol(get(ENV, "TEST_REL_ALLOWED", ":warning"))
8 changes: 4 additions & 4 deletions src/testrel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ function Step(;
inputs::AbstractDict=Dict(),
expected::AbstractDict=Dict(),
expected_problems::Vector=[],
allow_unexpected::Symbol=:warning,
allow_unexpected::Symbol=default_allowed(),
expect_abort::Bool=false,
timeout_sec::Int64=300,
timeout_sec::Int64=default_timeout(),
readonly::Bool=false,
)
return Step(
Expand Down Expand Up @@ -265,9 +265,9 @@ function test_rel(;
inputs::AbstractDict=Dict(),
expected::AbstractDict=Dict(),
expected_problems::Vector=[],
allow_unexpected::Symbol=:warning,
allow_unexpected::Symbol=default_timeout(),
expect_abort::Bool=false,
timeout_sec::Int64=300,
timeout_sec::Int64=default_timeout(),
broken::Bool=false,
clone_db::Option{String}=nothing,
engine::Option{String}=nothing,
Expand Down

0 comments on commit 66c1892

Please sign in to comment.