From 1634b57dbd022a34106cc95157dad010db607ab4 Mon Sep 17 00:00:00 2001 From: Ben Cooke Date: Wed, 14 May 2025 19:07:08 +0100 Subject: [PATCH] fix flaky test (#31046) --- server/channels/app/channel_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/channels/app/channel_test.go b/server/channels/app/channel_test.go index 0d02a251a3..9bc7100a2c 100644 --- a/server/channels/app/channel_test.go +++ b/server/channels/app/channel_test.go @@ -901,8 +901,8 @@ func TestLeaveChannel(t *testing.T) { t.Run("can leave private channel as last member", func(t *testing.T) { channel := th.createChannel(th.Context, th.BasicTeam, model.ChannelTypePrivate) - count, appErr := th.App.GetChannelMemberCount(th.Context, th.BasicChannel.Id) - require.Nil(t, appErr, "It should remove channel membership") + count, appErr := th.App.GetChannelMemberCount(th.Context, channel.Id) + require.Nil(t, appErr, "It should get the channel member count") require.Equal(t, int64(1), count) appErr = th.App.LeaveChannel(th.Context, channel.Id, th.BasicUser.Id)