diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index b5b91f0c2..069eb95e5 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -1097,6 +1097,9 @@ module MGCP_Test { 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 := { { 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); 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. */ + f_sleep(1.0) expect := { { name := "TTCN3.trunk.virtual-0.common.endpoints.used", mtype := "g", min := 0, max := 0} };