aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/process_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-06-01 07:29:23 +0200
committerBjörn Gustavsson <[email protected]>2017-06-03 08:45:46 +0200
commit1bb171a7c27fcb79435a915bac834a4013b5f0dc (patch)
tree8a88d51077ebd74c5da11cb041cff955ec569dd7 /erts/emulator/test/process_SUITE.erl
parent94e8b18640304bb20dc591a459802ba99dbbd39e (diff)
downloadotp-1bb171a7c27fcb79435a915bac834a4013b5f0dc.tar.gz
otp-1bb171a7c27fcb79435a915bac834a4013b5f0dc.tar.bz2
otp-1bb171a7c27fcb79435a915bac834a4013b5f0dc.zip
Contain damage cause by spawn_opt_max_heap_size failing
If process_SUITE:spawn_opt_max_heap_size/1 failed, the default value for the maximum heap size could have been changed. That would cause other test cases that spawned huge processes to fail. Contain the damage by always restoring the default value for max_heap_size in end_per_testcase/2.
Diffstat (limited to 'erts/emulator/test/process_SUITE.erl')
-rw-r--r--erts/emulator/test/process_SUITE.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/erts/emulator/test/process_SUITE.erl b/erts/emulator/test/process_SUITE.erl
index a65c3f0cad..180311202f 100644
--- a/erts/emulator/test/process_SUITE.erl
+++ b/erts/emulator/test/process_SUITE.erl
@@ -134,6 +134,11 @@ init_per_testcase(Func, Config) when is_atom(Func), is_list(Config) ->
[{testcase, Func}|Config].
end_per_testcase(Func, Config) when is_atom(Func), is_list(Config) ->
+ %% Restore max_heap_size to default value.
+ erlang:system_flag(max_heap_size,
+ #{size => 0,
+ kill => true,
+ error_logger => true}),
ok.
fun_spawn(Fun) ->