home · contact · privacy
For testing, use ERR_STR_TIMEOUT rather than 'FAKE_IRC_CONN_TIMEOUT_EXCEPTION'.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 15 Oct 2025 02:07:14 +0000 (04:07 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 15 Oct 2025 02:07:14 +0000 (04:07 +0200)
src/ircplom/testing.py
src/tests/_timeout_retries.test
src/tests/pingpong.test

index b63a3ad6275756392dc069b729d9373fdaf9d65a..c0ffd2a7e93637a6eeb55d649482b171a578971f 100644 (file)
@@ -107,9 +107,9 @@ class _FakeIrcConnection(IrcConnection):
                 except QueueEmpty:
                     yield None
                     continue
-                if msg == 'FAKE_IRC_CONN_TIMEOUT_EXCEPTION':
+                if msg == ERR_STR_TIMEOUT:
                     yield self._on_handled_loop_exception(
-                            IrcConnException(ERR_STR_TIMEOUT, abort=False))
+                            IrcConnException(msg, abort=False))
                     continue
                 if msg == 'FAKE_IRC_CONN_ABORT_EXCEPTION':
                     raise IrcConnException(msg, retry=True)
index c2ceebf184d206f1e63d27ea79d92658069febf3..981190fb532eb069a1fe872acfcdbec3651296c5 100644 (file)
@@ -54,9 +54,9 @@
 | conn-full-out
 
 # test retry chain also started by in-connection timeout
-<0 FAKE_IRC_CONN_TIMEOUT_EXCEPTION
+<0 timeout
 1 ..> PING :what's up?
-<0 FAKE_IRC_CONN_TIMEOUT_EXCEPTION
+<0 timeout
 1 ..$ connection_state set to: [broken: no timely PONG from server]
 repeat isupport-clear-in isupport-clear-out
 1 ..$ connection_state set to: []
index d29ec750db716bbfa2861356b67ccddf2d7e93c9..5f2d8c69b282c8869416f62db914b510d0f937c2 100644 (file)
@@ -34,7 +34,7 @@
 # ping on timeout, go on as normal if PONG received 
 | full-timeout-in
 | trigger-ping-in
-<0 FAKE_IRC_CONN_TIMEOUT_EXCEPTION
+<0 timeout
 1 ..> PING :what's up?
 | trigger-ping-out
 :0:1 ..< :*.?.net PONG *.?.net :what's up?
@@ -43,7 +43,7 @@
 
 # another timeout instead of pong? disconnect
 repeat trigger-ping-in trigger-ping-out
-<0 FAKE_IRC_CONN_TIMEOUT_EXCEPTION
+<0 timeout
 1 ..$ connection_state set to: [broken: no timely PONG from server]
 repeat isupport-clear-in isupport-clear-out
 1 ..$ connection_state set to: []