Change in osmo-ttcn3-hacks[master]: Fix race during shutdown

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/.

laforge gerrit-no-reply at lists.osmocom.org
Mon Jan 11 14:20:56 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22050 )

Change subject: Fix race during shutdown
......................................................................

Fix race during shutdown

To avoid a dynamic test case error we need to prevent messages arriving on
unconnected ports. Waiting some time before stopping components ensures that
any messages "in flight" will be delivered to the port before the component
is shutdown and disconnected.

It would be far nicer to mark a testresult "final" and ignore such
errors on shutdown, but I don't think it's possible in TTCN3.

This fixes TC_fc_bvc on my laptop which consistently failed with a DTE
before.

Change-Id: I98928f24745125642225681d13bf2e78691e9747
Related: SYS#5115, OS#4518
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 00f6e2e..62daaf4 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -526,6 +526,11 @@
 function f_cleanup() runs on test_CT {
 	var integer i;
 
+	/* To avoid a dynamic test case error we need to prevent messages arriving on unconnected
+	 * ports. Waiting here ensures that any messages "in flight" will be delivered to the port
+	 * before the component is shutdown and disconnected. */
+	f_sleep(0.2);
+
 	for (i := 0; i < lengthof(mp_nsconfig_sgsn); i := i+1) {
 		f_destroy_gb(g_sgsn[i]);
 	}

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22050
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: I98928f24745125642225681d13bf2e78691e9747
Gerrit-Change-Number: 22050
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210111/aed2042e/attachment.htm>


More information about the gerrit-log mailing list