feature_flags_SUITE: Kill dangling spammer process in registry_concurrent_reloads()

[Why]
It looks like `exit(Spammer, normal)` doesn't terminate the process.
This leaves a dangling process around and seems to cause transient
failures in the `try_to_deadlock_in_registry_reload_1` testcase that
follows it.

[How]
We use `exit(Spammer, kill)` and a monitor to wait for the process to
actually terminate.
This commit is contained in:
Jean-Sébastien Pédron 2024-03-06 10:58:25 +01:00
parent b3597c7a63
commit 2afffd59bd
No known key found for this signature in database
GPG Key ID: 39E99761A5FD94CC
1 changed files with 3 additions and 1 deletions

View File

@ -548,8 +548,10 @@ registry_concurrent_reloads(_Config) ->
%% all added feature flags.
timer:sleep(1000),
MRef = erlang:monitor(process, Spammer),
unlink(Spammer),
exit(Spammer, normal).
exit(Spammer, kill),
receive {'DOWN', MRef, process, Spammer, _} -> ok end.
registry_spammer(CurrentFeatureNames, FinalFeatureNames) ->
%% Infinite loop.