<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22050">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Fix race during shutdown<br><br>To avoid a dynamic test case error we need to prevent messages arriving on<br>unconnected ports. Waiting some time before stopping components ensures that<br>any messages "in flight" will be delivered to the port before the component<br>is shutdown and disconnected.<br><br>It would be far nicer to mark a testresult "final" and ignore such<br>errors on shutdown, but I don't think it's possible in TTCN3.<br><br>This fixes TC_fc_bvc on my laptop which consistently failed with a DTE<br>before.<br><br>Change-Id: I98928f24745125642225681d13bf2e78691e9747<br>Related: SYS#5115, OS#4518<br>---<br>M gbproxy/GBProxy_Tests.ttcn<br>1 file changed, 5 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn</span><br><span>index 00f6e2e..62daaf4 100644</span><br><span>--- a/gbproxy/GBProxy_Tests.ttcn</span><br><span>+++ b/gbproxy/GBProxy_Tests.ttcn</span><br><span>@@ -526,6 +526,11 @@</span><br><span> function f_cleanup() runs on test_CT {</span><br><span>  var integer i;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+    /* To avoid a dynamic test case error we need to prevent messages arriving on unconnected</span><br><span style="color: hsl(120, 100%, 40%);">+      * ports. Waiting here ensures that any messages "in flight" will be delivered to the port</span><br><span style="color: hsl(120, 100%, 40%);">+   * before the component is shutdown and disconnected. */</span><br><span style="color: hsl(120, 100%, 40%);">+      f_sleep(0.2);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>      for (i := 0; i < lengthof(mp_nsconfig_sgsn); i := i+1) {</span><br><span>          f_destroy_gb(g_sgsn[i]);</span><br><span>     }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22050">change 22050</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22050"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I98928f24745125642225681d13bf2e78691e9747 </div>
<div style="display:none"> Gerrit-Change-Number: 22050 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>