Skip to content

Commit

Permalink
Add a longer timeout in all generated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erszcz committed Jun 4, 2024
1 parent 6491b8b commit 0ede9ef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/known_problems_should_fail_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ end_per_testcase(_TestCase, _Config) ->
ok.

known_problems_should_fail_template(_@File) ->
Result = safe_type_check_file(_@File, [return_errors]),
Result = safe_type_check_file(_@File, [return_errors, {form_check_timeout_ms, 2000}]),
case Result of
crash ->
ok;
Expand Down
2 changes: 1 addition & 1 deletion test/known_problems_should_pass_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ end_per_testcase(_TestCase, _Config) ->
known_problems_should_pass_template(_@File) ->
{ok, Forms} = gradualizer_file_utils:get_forms_from_erl(_@File, []),
ExpectedErrors = typechecker:number_of_exported_functions(Forms),
ReturnedErrors = length(safe_type_check_file(_@File, [return_errors])),
ReturnedErrors = length(safe_type_check_file(_@File, [return_errors, {form_check_timeout_ms, 2000}])),
?assertEqual(ExpectedErrors, ReturnedErrors).

safe_type_check_file(File) ->
Expand Down
2 changes: 1 addition & 1 deletion test/should_fail_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ end_per_testcase(_TestCase, _Config) ->
ok.

should_fail_template(_@File) ->
Errors = gradualizer:type_check_file(_@File, [return_errors]),
Errors = gradualizer:type_check_file(_@File, [return_errors, {form_check_timeout_ms, 2000}]),
Timeouts = [ E || {_File, {form_check_timeout, _}} = E <- Errors],
?assertEqual(0, length(Timeouts)),
%% Test that error formatting doesn't crash
Expand Down

0 comments on commit 0ede9ef

Please sign in to comment.