From b32d3dbbc9e0bad102567ceff89716cd405b7107 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Mon, 9 Jun 2025 20:20:15 +0100 Subject: [PATCH] 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. --- test/integration/tests/core.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/integration/tests/core.cpp b/test/integration/tests/core.cpp index b494ce07..2bef8b67 100644 --- a/test/integration/tests/core.cpp +++ b/test/integration/tests/core.cpp @@ -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");