Change in osmo-ttcn3-hacks[master]: MGCP_Test: fix TC_dlcx_wildcarded

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Thu Nov 18 17:38:15 UTC 2021


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26320 )


Change subject: MGCP_Test: fix TC_dlcx_wildcarded
......................................................................

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
---
M mgw/MGCP_Test.ttcn
1 file changed, 4 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/20/26320/1

diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index b5b91f0..069eb95 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -1097,6 +1097,9 @@
 			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 @@
 		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}
 		};

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26320
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I90613616f9ff85ca59464dfd45d331ed1a54d9c5
Gerrit-Change-Number: 26320
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211118/5891bef6/attachment.htm>


More information about the gerrit-log mailing list