fix flaky test (#31046)

This commit is contained in:
Ben Cooke
2025-05-14 14:07:08 -04:00
committed by GitHub
parent 6b4ab0a891
commit 1634b57dbd
+2 -2
View File
@@ -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)