File: raise-connection-delay-in-tests.patch

package info (click to toggle)
dropbear 2025.88-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,572 kB
  • sloc: ansic: 108,062; sh: 4,765; perl: 774; python: 763; makefile: 715; java: 177
file content (29 lines) | stat: -rw-r--r-- 1,177 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
From: Guilhem Moulin <guilhem@debian.org>
Date: Sun, 3 Apr 2022 09:38:14 +0200
Subject: Raise connection delay in tests.

0.1s delay is too short on slower hardware such as the armhf debci
runners (or armhf porterboxes).  Ideally the test would wait for the
listener to actually be available instead of doing guess work, but
raising the delay should be good enough for now.
---
 test/test_channels.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/test_channels.py b/test/test_channels.py
index d6feb04..b58f47d 100644
--- a/test/test_channels.py
+++ b/test/test_channels.py
@@ -104,10 +104,10 @@ def test_tcpflushout(request, dropbear, size, fwd_flag):
 	q = queue.Queue()
 	with HandleTcp(3344, timeout=1, response=q) as tcp:
 
-		r = dbclient(request, f"-{fwd_flag}", "7788:localhost:3344", "sleep 0.1; echo -n done",
+		r = dbclient(request, f"-{fwd_flag}", "7788:localhost:3344", "sleep 1; echo -n done",
 			text=True, background=True, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
 		# time to let the listener start
-		time.sleep(0.1)
+		time.sleep(1)
 		# open a tcp connection
 		c = socket.create_connection(("localhost", 7788))