From 6c740e8d52dd9e497ac6646dc599fd87fe279183 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Thu, 30 Jun 2022 12:04:34 +0200 Subject: [PATCH] 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 --- mgw/MGCP_Test.ttcn | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 60f955f17..0242db9cb 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -1118,8 +1118,14 @@ module MGCP_Test { 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} };