Skip to content

Commit 396841e

Browse files
committed
Another workaround for Sable's latency with the history server
1 parent f350ff0 commit 396841e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

irctest/server_tests/chathistory.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ def testInvalidTargets(self):
111111

112112
# test a nonexistent channel
113113
self.sendLine(bar, "CHATHISTORY LATEST #nonexistent_channel * 10")
114-
msgs = self.getMessages(bar)
114+
while not (msgs := self.getMessages(bar)):
115+
# need to retry when Sable has the history server on
116+
pass
115117
msgs = [msg for msg in msgs if msg.command != "MODE"] # :NickServ MODE +r
116118
self.assertMessageMatch(
117119
msgs[0],
@@ -121,7 +123,9 @@ def testInvalidTargets(self):
121123

122124
# as should a real channel to which one is not joined:
123125
self.sendLine(bar, "CHATHISTORY LATEST %s * 10" % (real_chname,))
124-
msgs = self.getMessages(bar)
126+
while not (msgs := self.getMessages(bar)):
127+
# need to retry when Sable has the history server on
128+
pass
125129
self.assertMessageMatch(
126130
msgs[0],
127131
command="FAIL",

0 commit comments

Comments
 (0)