From: Christian Heller <c.heller@plomlompom.de>
Date: Thu, 6 Nov 2025 03:10:58 +0000 (+0100)
Subject: More test refactoring.
X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%22https:/validator.w3.org/static/process?a=commitdiff_plain;p=ircplom

More test refactoring.
---

diff --git a/src/tests/_timeout_retries.test b/src/tests/_timeout_retries.test
index be14b59..2492696 100644
--- a/src/tests/_timeout_retries.test
+++ b/src/tests/_timeout_retries.test
@@ -23,8 +23,18 @@ log 1 $ connection_state set to: [connecting]
 × fake-testing-timeout
 log 1 $ connection_state set to: [failed to connect: FAKE TESTING TIMEOUT]
 
+× retry-in-1
+log 1 $ will retry connecting in 1 seconds
+
+× port-10000-w-context
+insert identifiers : +2
+log 1 $ port set to: [10000]
+insert fake-testing-timeout : +1
+
+× port-10001
+log 1 $ port set to: [10001]
+
 × conns-init
-log 1 $ port set to: [10003]
 log 1 $ nick_wanted set to: [foo]
 log 1 $ user_wanted set to: [foobarbazquux]
 log 1 $ realname set to: [baz]
@@ -46,28 +56,27 @@ log 1 > NICK :foo
 > /connect foo.bar.baz:10003 foo:bar baz:foobarbazquux
 insert clientwin-init
 log 1 $ hostname set to: [foo.bar.baz]
+log 1 $ port set to: [10003]
 insert conns-init
 
 # check increase of retry waits
-insert connecting : +1
+insert connecting
 log 2 $ attempting connection to foo.bar.baz:10003 identifying with …
-insert identifiers : +2
+insert identifiers
 log 1 $ port set to: [10002]
 insert fake-testing-timeout
-log 1 $ will retry connecting in 1 seconds
+insert retry-in-1
 #
-insert connecting : +1
+insert connecting
 log 2 $ attempting connection to foo.bar.baz:10002 identifying with …
-insert identifiers : +2
-log 1 $ port set to: [10001]
+insert identifiers
+insert port-10001
 insert fake-testing-timeout
 log 1 $ will retry connecting in 2 seconds
 #
-insert connecting : +1
+insert connecting
 log 2 $ attempting connection to foo.bar.baz:10001 identifying with …
-insert identifiers : +2
-log 1 $ port set to: [10000]
-insert fake-testing-timeout
+insert port-10000-w-context
 log 1 $ will retry connecting in 4 seconds
 
 # check connecting works with TestingClient port finally reduced to 10000
@@ -84,7 +93,7 @@ log 1 $ connection_state set to: [broken: no timely PONG from server]
 insert isupport-clear
 log 1 $ connection_state set to: []
 log 2 $ DISCONNECTED
-log 1 $ will retry connecting in 1 seconds
+insert retry-in-1
 
 # check /disconnect aborts retry chain
 > /window 1
@@ -96,14 +105,12 @@ wait 1
 > /connect baz.bar.foo:10001 foo:bar baz:foobarbazquux
 insert clientwin-init : +3
 log 3 $ hostname set to: [baz.bar.foo]
-log 3 $ port set to: [10001]
-insert conns-init 1: +3
+insert port-10001 : +3
+insert conns-init : +3
 insert connecting : +3
 log 4 $ attempting connection to baz.bar.foo:10001 identifying with …
-insert identifiers : +4
-log 3 $ port set to: [10000]
-insert fake-testing-timeout : +3
-log 3 $ will retry connecting in 1 seconds
+insert port-10000-w-context : +3
+insert retry-in-1 : +3
 
 # during retry-wait /reconnect, then wait announced duration to check nothing else happens
 > /window 3