From 637ef6c87ff363bb520cac8302223b81f9090bfd Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Wed, 25 Jul 2018 10:49:09 +0200 Subject: bsc: stop all components before terminating testcase It seems mtc.stop() alone does not really solve the race conditions when shutting down components. The error happens when messages are sent on ports which are no longer connected since the receiving component has terminated. Some web search http://www.ttcn-3.org/TTCN3UCAsia2007/Presentations/TTCN3%20UC%202007%20Concurrent%20TTCN.pdf suggested that one should stop all components before calling mtc.stop (slide 38). Slide 33 also mentions the difference between .stop and .kill. Kill removes the port connections while stop does not. And I think looking at the logs when the testcase teminates (through mtc.stop or otherwise) it is internally calling kill on all the components. So hopefully stopping all components and then stopping the mtc will fix this nasty issue. I verified locally that the situation improves between commits now when running BSC_Tests.TC_paging_imsi_nochan_all 20 times in a loop and otherwise generating load on the system. It reliably failed before this patch and I wasn't able to get it to fail with it. Change-Id: I398883492919ceabcf94b5cc2361c63ec772d9d5 --- bsc/BSC_Tests.ttcn | 1 + 1 file changed, 1 insertion(+) (limited to 'bsc/BSC_Tests.ttcn') diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 94122510..c802a6b2 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -114,6 +114,7 @@ modulepar { } private function f_shutdown_helper() runs on test_CT { + all component.stop; setverdict(pass); mtc.stop; } -- cgit v1.2.3