aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2019-06-10 13:12:09 +0200
committerSiri Hansen <[email protected]>2019-06-10 13:12:09 +0200
commita8bb18c1f759102eb0f7a794914b28506ada8048 (patch)
treeb4a6f924d53eee10f8e31b10151ff3317da6e32b /lib/common_test/test
parent163cc998f96a4dc6e2d9151cce257dabeb1b1353 (diff)
parentfe8521bf93994a1d0d2021099f3a99473e1d3731 (diff)
downloadotp-a8bb18c1f759102eb0f7a794914b28506ada8048.tar.gz
otp-a8bb18c1f759102eb0f7a794914b28506ada8048.tar.bz2
otp-a8bb18c1f759102eb0f7a794914b28506ada8048.zip
Merge branch 'siri/ct/hook-terminated-not-initiated/ERIERL-370/OTP-15863' into maint
* siri/ct/hook-terminated-not-initiated/ERIERL-370/OTP-15863: [ct] Fix bug where Hook:terminate/1 was called before Hook:init/2
Diffstat (limited to 'lib/common_test/test')
-rw-r--r--lib/common_test/test/ct_hooks_SUITE.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/common_test/test/ct_hooks_SUITE.erl b/lib/common_test/test/ct_hooks_SUITE.erl
index 340b8f3d52..08c18d91e2 100644
--- a/lib/common_test/test/ct_hooks_SUITE.erl
+++ b/lib/common_test/test/ct_hooks_SUITE.erl
@@ -671,9 +671,15 @@ test_events(scope_suite_cth) ->
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
%% check that post_groups and post_all comes before init when hook
%% is installed in suite/0
+ %% And there should be no terminate after these, since init is
+ %% not yet called.
{?eh,cth,{'_',post_groups,['_',[]]}},
- {?eh,cth,{'_',post_all,['_','_',[]]}},
- {?eh,tc_start,{ct_scope_suite_cth_SUITE,init_per_suite}},
+ {negative,
+ {?eh,cth,{'_',terminate,['_']}},
+ {?eh,cth,{'_',post_all,['_','_',[]]}}},
+ {negative,
+ {?eh,cth,{'_',terminate,['_']}},
+ {?eh,tc_start,{ct_scope_suite_cth_SUITE,init_per_suite}}},
{?eh,cth,{'_',id,[[]]}},
{?eh,cth,{'_',init,['_',[]]}},
{?eh,cth,{'_',pre_init_per_suite,[ct_scope_suite_cth_SUITE,'$proplist',[]]}},