From b8264217167ec559c3a2765529e0d42f2de6f673 Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Mon, 8 Aug 2022 14:14:18 +0530 Subject: [PATCH] MM-45534: Fix flaky TestCreateGroupChannel (#20781) The returned elements weren't in a specific order. Therefore, we need to perform an order insensitive match. https://mattermost.atlassian.net/browse/MM-45534 ```release-note NONE ``` --- api4/channel_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api4/channel_test.go b/api4/channel_test.go index a47a92b12b..216e54f082 100644 --- a/api4/channel_test.go +++ b/api4/channel_test.go @@ -569,7 +569,7 @@ func TestCreateGroupChannel(t *testing.T) { require.Equal(t, rgc.Id, rgc2.Id, "should have returned existing channel") m2, _ := th.App.GetChannelMembersPage(th.Context, rgc2.Id, 0, 10) - require.Equal(t, m, m2) + require.ElementsMatch(t, m, m2) _, resp, err = client.CreateGroupChannel([]string{user2.Id}) require.Error(t, err)