cbc: Introduce f_shutdown_helper() and call it in every test

Change-Id: I95e6f8a5a5c35d35662950e1105bdb17d2ca00de
This commit is contained in:
Pau Espin 2022-06-23 12:19:47 +02:00 committed by Vadim Yanitskiy
parent 51dca9fa15
commit 9d8b6bf717
1 changed files with 14 additions and 2 deletions

View File

@ -132,6 +132,12 @@ altstep as_cbsp_restart(integer idx) runs on CBSP_Adapter_CT {
[] CBSP[idx].receive(tr_CBSP_Recv(g_cbsp_conn_id[idx], tr_CBSP_RESTART));
}
private function f_shutdown_helper() runs on test_CT {
all component.stop;
setverdict(pass);
mtc.stop;
}
private function f_init(boolean raw := false) runs on test_CT {
f_http_init(mp_cbc_host, mp_cbc_ecbe_port);
CBSP_Adapter.f_connect(mp_cbc_host, mp_cbc_cbsp_port, "", mp_local_cbsp_port);
@ -157,7 +163,7 @@ testcase TC_rx_keepalive() runs on test_CT {
rx := f_cbsp_exp(tr_CBSP_KEEP_ALIVE(?));
f_cbsp_find_ie(rx, CBSP_IEI_KEEP_ALIVE_REP_PERIOD, ie);
setverdict(pass);
f_shutdown_helper();
}
/* test whether CBC terminates connection if KEEP-ALIVE is not answered by BSC */
@ -177,7 +183,7 @@ testcase TC_rx_keepalive_timeout() runs on test_CT {
/* expect the CBSP connection to be closed */
CBSP[0].receive(PortEvent:{connClosed:=?})
setverdict(pass);
f_shutdown_helper();
}
type record CBS_Message {
@ -298,6 +304,7 @@ testcase TC_write_replace() runs on test_CT {
};
f_cbsp_write(msg);
f_sleep(100.0);
f_shutdown_helper();
}
testcase TC_selftest() runs on test_CT {
@ -410,6 +417,7 @@ testcase TC_ecbe_create_delete_cgi() runs on test_CT {
ts_BSSMAP_CI_CGI('901'H, '70'H, 24, 43)
});
f_create_and_delete(valueof(msg), cell_list_success);
f_shutdown_helper();
}
testcase TC_ecbe_create_delete_lac_ci() runs on test_CT {
f_init();
@ -421,6 +429,7 @@ testcase TC_ecbe_create_delete_lac_ci() runs on test_CT {
ts_BSSMAP_CI_LAC_CI(10003, 50003)
});
f_create_and_delete(valueof(msg), cell_list_success);
f_shutdown_helper();
}
testcase TC_ecbe_create_delete_lac() runs on test_CT {
f_init();
@ -432,6 +441,7 @@ testcase TC_ecbe_create_delete_lac() runs on test_CT {
ts_BSSMAP_CI_LAC(10003)
});
f_create_and_delete(valueof(msg), cell_list_success);
f_shutdown_helper();
}
testcase TC_ecbe_create_delete_ci() runs on test_CT {
f_init();
@ -443,6 +453,7 @@ testcase TC_ecbe_create_delete_ci() runs on test_CT {
ts_BSSMAP_CI_CI(50003)
});
f_create_and_delete(valueof(msg), cell_list_success);
f_shutdown_helper();
}
testcase TC_ecbe_create_delete_lai() runs on test_CT {
f_init();
@ -454,6 +465,7 @@ testcase TC_ecbe_create_delete_lai() runs on test_CT {
ts_BSSMAP_CI_LAI('901'H, '70'H, 27)
});
f_create_and_delete(valueof(msg), cell_list_success);
f_shutdown_helper();
}
control {