mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +01:00
Merge pull request #598 from guusdk/sint_muc-occupant-race
[sinttest] Fix race condition in MUC test
This commit is contained in:
commit
98ff4d8a65
1 changed files with 2 additions and 3 deletions
|
@ -214,16 +214,15 @@ public class MultiUserChatOccupantIntegrationTest extends AbstractMultiUserChatI
|
|||
final Resourcepart nicknameThree = Resourcepart.from("three-" + randomString);
|
||||
|
||||
createMuc(mucAsSeenByOne, nicknameOne);
|
||||
mucAsSeenByTwo.join(nicknameTwo);
|
||||
|
||||
SimpleResultSyncPoint oneSeesTwo = new SimpleResultSyncPoint();
|
||||
mucAsSeenByOne.addParticipantListener(presence -> {
|
||||
if (nicknameTwo.equals(presence.getFrom().getResourceOrEmpty())) {
|
||||
oneSeesTwo.signal();
|
||||
}
|
||||
});
|
||||
mucAsSeenByOne.grantModerator(nicknameTwo);
|
||||
mucAsSeenByTwo.join(nicknameTwo);
|
||||
oneSeesTwo.waitForResult(timeout);
|
||||
mucAsSeenByOne.grantModerator(nicknameTwo);
|
||||
|
||||
List<Presence> results = new ArrayList<>();
|
||||
mucAsSeenByThree.addParticipantListener(results::add);
|
||||
|
|
Loading…
Reference in a new issue