Fix test on cygwin

Depending on timing between client and server, the initial JOIN can come in either order - in one case forwarding directly from client, in another joining the channels after client disconnected.
This commit is contained in:
Alexey Sokolov
2025-06-09 20:20:15 +01:00
parent d1f26593b3
commit b32d3dbbc9
+5 -1
View File
@@ -27,6 +27,7 @@ using testing::SizeIs;
using testing::Lt;
using testing::Gt;
using testing::AllOf;
using testing::AnyOf;
namespace znc_inttest {
namespace {
@@ -396,7 +397,10 @@ TEST_F(ZNCTest, MoveChannels) {
client.Close();
ircd.Write(":server 001 nick :Hello");
ircd.ReadUntil("JOIN #foo,#bar");
QByteArray joins;
ircd.ReadUntilAndGet("JOIN", joins);
ASSERT_THAT(joins.toStdString(), AnyOf(HasSubstr("JOIN #foo,#bar"),
HasSubstr("JOIN #bar,#foo")));
ircd.Write(":nick JOIN :#foo");
ircd.Write(":server 353 nick #foo :nick");
ircd.Write(":server 366 nick #foo :End of /NAMES list");