MGCP_Test: fix TC_dlcx_wildcarded

Due to the migration to a multithreading scheme the timing behavior of
the stats items has slightly changed. There is now a 1 sec update cycle
in which the stats items are regenerated. This means we have to wait 1
sec. before we can query the endpoints.used stats item.

Change-Id: I90613616f9ff85ca59464dfd45d331ed1a54d9c5
Related: OS#5316
This commit is contained in:
Philipp Maier 2021-11-18 18:33:39 +01:00 committed by laforge
parent c18ff4734b
commit 1298b09cb4
1 changed files with 4 additions and 8 deletions

View File

@ -1097,6 +1097,9 @@ module MGCP_Test {
resp := mgcp_transceive_mgw(cmd, tr_CRCX_ACK); resp := mgcp_transceive_mgw(cmd, tr_CRCX_ACK);
} }
/* Wait until the stats items have seteled and then check if we get the expected number (all) of
* occupied endpoints */
f_sleep(1.0)
expect := { expect := {
{ name := "TTCN3.trunk.virtual-0.common.endpoints.used", mtype := "g", min := n_endpoints, max := n_endpoints} { name := "TTCN3.trunk.virtual-0.common.endpoints.used", mtype := "g", min := n_endpoints, max := n_endpoints}
}; };
@ -1114,15 +1117,8 @@ module MGCP_Test {
cmd := ts_DLCX(get_next_trans_id(), ep); cmd := ts_DLCX(get_next_trans_id(), ep);
mgcp_transceive_mgw(cmd, rtmpl); mgcp_transceive_mgw(cmd, rtmpl);
/* The stats reporter collects multiple samples during the reporting interval and
* reports the highest back to the user. This means we will not immediately get
* the 0 endpoints but an intermediate result instead. */
expect := {
{ name := "TTCN3.trunk.virtual-0.common.endpoints.used", mtype := "g", min := 0, max := n_endpoints}
};
f_statsd_expect(expect);
/* The second interval must resturn a result with 0 endpoints in use. */ /* The second interval must resturn a result with 0 endpoints in use. */
f_sleep(1.0)
expect := { expect := {
{ name := "TTCN3.trunk.virtual-0.common.endpoints.used", mtype := "g", min := 0, max := 0} { name := "TTCN3.trunk.virtual-0.common.endpoints.used", mtype := "g", min := 0, max := 0}
}; };