diff --git a/irctest/server_tests/regressions.py b/irctest/server_tests/regressions.py index bf9145c..1f11ff5 100644 --- a/irctest/server_tests/regressions.py +++ b/irctest/server_tests/regressions.py @@ -2,10 +2,13 @@ Regression tests for bugs in `Ergo `_. """ -import time - from irctest import cases, runner -from irctest.numerics import ERR_ERRONEUSNICKNAME, ERR_NICKNAMEINUSE, RPL_WELCOME +from irctest.numerics import ( + ERR_ERRONEUSNICKNAME, + ERR_NICKNAMEINUSE, + RPL_HELLO, + RPL_WELCOME, +) from irctest.patma import ANYDICT @@ -111,8 +114,7 @@ class RegressionsTestCase(cases.BaseServerTestCase): self.sendLine(1, "NICK *") self.sendLine(1, "USER u s e r") replies = {"NOTICE"} - time.sleep(2) # give time to slow servers, like irc2 to reply - while replies == {"NOTICE"}: + while replies <= {"NOTICE", RPL_HELLO}: replies = set(msg.command for msg in self.getMessages(1, synchronize=False)) self.assertIn(ERR_ERRONEUSNICKNAME, replies) self.assertNotIn(RPL_WELCOME, replies)