laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28494 )
Change subject: MGCP_Test: fix TC_dlcx_wildcarded ......................................................................
MGCP_Test: fix TC_dlcx_wildcarded
When the final condition of the testcase is verified through statsd, there may be still (invalid) data from a previous measurement in the statsd pipeline, querying the stats once before verifying the actual stats fixes the problem.
Change-Id: I5fe18e433b32c364778b515ed37fcbcf443b3cb3 Related: OS#5572 --- M mgw/MGCP_Test.ttcn 1 file changed, 8 insertions(+), 2 deletions(-)
Approvals: laforge: Looks good to me, approved daniel: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 60f955f..0242db9 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -1118,8 +1118,14 @@ cmd := ts_DLCX(get_next_trans_id(), ep); mgcp_transceive_mgw(cmd, rtmpl);
- /* The second interval must resturn a result with 0 endpoints in use. */ - f_sleep(1.0) + /* Query a the statsd once to ensure that intermediate results are pulled from the + * pipeline. The second query (below) will return the actual result. */ + expect := { + { name := "TTCN3.trunk.virtual-0.common.endpoints.used", mtype := "g", min := 0, max := n_endpoints} + }; + f_statsd_expect(expect); + + /* The second query must resturn a result with 0 endpoints in use. */ expect := { { name := "TTCN3.trunk.virtual-0.common.endpoints.used", mtype := "g", min := 0, max := 0} };