From bdcfe03ed4bd95d84738dfb9168ada8e9862771e Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 10 Jun 2019 16:54:42 +0200 Subject: bscnat: Move generic code to wait for test into its own function Change-Id: Ia95ec02d7ca631e037abfbcfc7881b57e37aef5b --- bsc-nat/BSCNAT_Tests.ttcn | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/bsc-nat/BSCNAT_Tests.ttcn b/bsc-nat/BSCNAT_Tests.ttcn index 2fab4a37..6b0c757a 100644 --- a/bsc-nat/BSCNAT_Tests.ttcn +++ b/bsc-nat/BSCNAT_Tests.ttcn @@ -163,12 +163,8 @@ function f_init(boolean use_osmux) runs on test_CT { } -function f_TC_recv_dump(boolean use_osmux := false) runs on test_CT { +function f_wait_finish(timer T) runs on test_CT { var integer i; - timer T := 30.0; - - f_init(use_osmux); - alt { /* wait for BSC to stop. The idea is that the BSC components terminate first */ [] bsc[0].BSC.done { } @@ -182,6 +178,15 @@ function f_TC_recv_dump(boolean use_osmux := false) runs on test_CT { } } + +function f_TC_recv_dump(boolean use_osmux := false) runs on test_CT { + timer T := 30.0; + + f_init(use_osmux); + + f_wait_finish(T); +} + testcase TC_recv_dump() runs on test_CT { f_TC_recv_dump(); } -- cgit v1.2.3