dexter has uploaded this change for review.

View Change

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(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/94/28494/1
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}
};

To view, visit change 28494. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I5fe18e433b32c364778b515ed37fcbcf443b3cb3
Gerrit-Change-Number: 28494
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier@sysmocom.de>
Gerrit-MessageType: newchange