From 11b08a2bdbc03b59d751e043161acd1bf9b0814c Mon Sep 17 00:00:00 2001 From: Val Lorentz Date: Mon, 28 Oct 2024 20:22:40 +0100 Subject: [PATCH] Another workaround for Sable's latency with the history server --- irctest/server_tests/chathistory.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/irctest/server_tests/chathistory.py b/irctest/server_tests/chathistory.py index ec4046b1..44334d39 100644 --- a/irctest/server_tests/chathistory.py +++ b/irctest/server_tests/chathistory.py @@ -111,7 +111,8 @@ def testInvalidTargets(self): # test a nonexistent channel self.sendLine(bar, "CHATHISTORY LATEST #nonexistent_channel * 10") - msgs = self.getMessages(bar) + while not (msgs := self.getMessages(bar)): + pass msgs = [msg for msg in msgs if msg.command != "MODE"] # :NickServ MODE +r self.assertMessageMatch( msgs[0], @@ -121,7 +122,8 @@ def testInvalidTargets(self): # as should a real channel to which one is not joined: self.sendLine(bar, "CHATHISTORY LATEST %s * 10" % (real_chname,)) - msgs = self.getMessages(bar) + while not (msgs := self.getMessages(bar)): + pass self.assertMessageMatch( msgs[0], command="FAIL",