From 187cf0a2a5cb5cc5f94e2b9bb07b03955ad6eb4d Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 29 Jul 2011 11:51:15 +0200 Subject: Update the return from init/2 to be {ok, NewState} or {ok,NewState,Priority} instead of NewState. NewState can still be returned, but is only kept for backward compatability reasons. --- lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl | 4 ++-- .../test/ct_hooks_SUITE_data/cth/tests/state_update_cth.erl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/common_test/test/ct_hooks_SUITE_data/cth') diff --git a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl index 71ed61b4c0..7befcfa57c 100644 --- a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl +++ b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl @@ -71,11 +71,11 @@ %% @doc Always called before any other callback function. Use this to initiate %% any common state. It should return an state for this CTH. -spec init(Id :: term(), Opts :: proplists:proplist()) -> - State :: #state{}. + {ok, State :: #state{}}. init(Id, Opts) -> gen_event:notify(?CT_EVMGR_REF, #event{ name = cth, node = node(), data = {?MODULE, init, [Id, Opts]}}), - Opts. + {ok,Opts}. %% @doc The ID is used to uniquly identify an CTH instance, if two CTH's %% return the same ID the seconds CTH is ignored. This function should NOT diff --git a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/state_update_cth.erl b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/state_update_cth.erl index 35c990c0be..9da48d3a4c 100644 --- a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/state_update_cth.erl +++ b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/state_update_cth.erl @@ -29,7 +29,7 @@ init(Id, Opts) -> State = empty_cth:init(Id, Opts), - [init|State]. + {ok, [init|State]}. pre_init_per_suite(Suite, Config, State) -> empty_cth:pre_init_per_suite(Suite,Config,State), -- cgit v1.2.3