aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common_test/src')
-rw-r--r--lib/common_test/src/ct_suite_callback.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/common_test/src/ct_suite_callback.erl b/lib/common_test/src/ct_suite_callback.erl
index 8372303737..508d3b5bd6 100644
--- a/lib/common_test/src/ct_suite_callback.erl
+++ b/lib/common_test/src/ct_suite_callback.erl
@@ -169,8 +169,9 @@ call(Fun, Config, Meta, NoChangeRet) when is_function(Fun) ->
call([{CB, call_init, NextFun} | Rest], Config, Meta, CBs) ->
try
{Config, {NewId, _, {Mod,_State}} = NewCB} = call_init(CB, Config, Meta),
- {NewCBs, NewRest} = case proplists:get_value(NewId, CBs, NextFun) of
- undefined -> {CBs ++ [NewCB],Rest};
+ {NewCBs, NewRest} = case lists:keyfind(NewId, 1, CBs) of
+ false when NextFun == undefined ->
+ {CBs ++ [NewCB],Rest};
ExistingCB when is_tuple(ExistingCB) ->
{CBs, Rest};
_ ->