File: assert-timeout.patch

package info (click to toggle)
octave-instrument-control 0.9.5-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,488 kB
  • sloc: cpp: 16,417; sh: 2,868; ansic: 886; python: 438; makefile: 342; xml: 28
file content (43 lines) | stat: -rw-r--r-- 1,444 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Description: Better check of timeout parameter
 Some unit tests check whether the timeout parameter is working
 correctly by asserting it against the nominal value with a small
 tolerance value. The tests fails randomly depending on the processing
 charge of the system. This patch fixes the issue by verifying the
 ellapsed time is greater than the nominal value
Author: Rafael Laboissière <rafael@debian.org>
Forwarded: https://savannah.gnu.org/bugs/?67613
Last-Update: 2025-10-20

--- octave-instrument-control-0.9.5.orig/src/tcp/tcp_read.cc
+++ octave-instrument-control-0.9.5/src/tcp/tcp_read.cc
@@ -130,7 +130,7 @@ Read from tcp interface.\n \
 %! t = toc;
 %! assert (c, 0);
 %! assert (isempty (d));
-%! assert (t, 1.0, 0.1)
+%! assert (t >= 1.0)
 %!
 %! tcp_close (a);
 
--- octave-instrument-control-0.9.5.orig/src/tcpclient/__tcpclient_read__.cc
+++ octave-instrument-control-0.9.5/src/tcpclient/__tcpclient_read__.cc
@@ -128,7 +128,7 @@ Private function t read from tcpclient i
 %! t = toc;
 %! assert (c, 0);
 %! assert (isempty (d));
-%! assert (t, 1.0, 0.1)
+%! assert (t >= 1.0)
 %!
 %! clear a
 
--- octave-instrument-control-0.9.5.orig/src/udpport/__udpport_read__.cc
+++ octave-instrument-control-0.9.5/src/udpport/__udpport_read__.cc
@@ -151,7 +151,7 @@ Optional outputs are provided for the so
 %! t = toc;
 %! assert (c, 0);
 %! assert (isempty (d));
-%! assert (t, 1.0, 0.1)
+%! assert (t >= 1.0)
 %! clear a;
 
 #endif