fix_: flaky testReevaluateMemberPrivilegedRoleInClosedCommunity
`waitOnCommunitiesEvent` must be invoked before action that triggers the event. fixes: #4578 fixes: #4761
This commit is contained in:
parent
d80db940d7
commit
709d75d69c
|
@ -1833,6 +1833,13 @@ func (s *MessengerCommunitiesTokenPermissionsSuite) testReevaluateMemberPrivileg
|
|||
PermissionID: tokenMemberPermission.Id,
|
||||
}
|
||||
|
||||
waitOnReevaluation := waitOnCommunitiesEvent(s.owner, func(sub *communities.Subscription) bool {
|
||||
if sub.Community == nil {
|
||||
return false
|
||||
}
|
||||
return !checkRoleBasedOnThePermissionType(permissionType, &s.alice.identity.PublicKey, sub.Community)
|
||||
})
|
||||
|
||||
response, err = s.owner.DeleteCommunityTokenPermission(deleteMemberTokenPermission)
|
||||
s.Require().NoError(err)
|
||||
s.Require().NotNil(response)
|
||||
|
@ -1843,13 +1850,6 @@ func (s *MessengerCommunitiesTokenPermissionsSuite) testReevaluateMemberPrivileg
|
|||
s.Require().NoError(err)
|
||||
s.Require().Len(response.Communities()[0].TokenPermissions(), 0)
|
||||
|
||||
waitOnReevaluation := waitOnCommunitiesEvent(s.owner, func(sub *communities.Subscription) bool {
|
||||
if sub.Community == nil {
|
||||
return false
|
||||
}
|
||||
return !checkRoleBasedOnThePermissionType(permissionType, &s.alice.identity.PublicKey, sub.Community)
|
||||
})
|
||||
|
||||
err = s.owner.communitiesManager.ForceMembersReevaluation(community.ID())
|
||||
s.Require().NoError(err)
|
||||
|
||||
|
|
Loading…
Reference in New Issue