diff --git a/api4/group_test.go b/api4/group_test.go index a7ef53f265..e5e896651e 100644 --- a/api4/group_test.go +++ b/api4/group_test.go @@ -7,6 +7,7 @@ import ( "fmt" "net/http" "testing" + "time" "github.com/mattermost/mattermost-server/v5/model" "github.com/stretchr/testify/assert" @@ -236,6 +237,7 @@ func TestUnlinkGroupTeam(t *testing.T) { response = th.Client.UnlinkGroupSyncable(g.Id, th.BasicTeam.Id, model.GroupSyncableTypeTeam) assert.NotNil(t, response.Error) + time.Sleep(2 * time.Second) // A hack to let "go c.App.SyncRolesAndMembership" finish before moving on. th.UpdateUserToTeamAdmin(th.BasicUser, th.BasicTeam) ok, response := th.Client.Logout() assert.True(t, ok)