mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-25 21:42:07 +01:00
[sinttest] Ensure that message has body in mucJoinEventOrderingTest()
It is possible that messages do not have a body. Therefore, we need to ensure that the message has one before we compare the body.
This commit is contained in:
parent
9447030cd4
commit
c87bb8aaa4
1 changed files with 4 additions and 1 deletions
|
@ -86,7 +86,10 @@ public class MultiUserChatOccupantIntegrationTest extends AbstractMultiUserChatI
|
||||||
// Send and wait for the message to have been reflected, so that we can be sure it's part of the MUC history.
|
// Send and wait for the message to have been reflected, so that we can be sure it's part of the MUC history.
|
||||||
final SimpleResultSyncPoint messageReflectionSyncPoint = new SimpleResultSyncPoint();
|
final SimpleResultSyncPoint messageReflectionSyncPoint = new SimpleResultSyncPoint();
|
||||||
mucAsSeenByOne.addMessageListener(message -> {
|
mucAsSeenByOne.addMessageListener(message -> {
|
||||||
if (message.getBody().equals(mucMessage)) {
|
String body = message.getBody();
|
||||||
|
if (body == null) return;
|
||||||
|
|
||||||
|
if (body.equals(mucMessage)) {
|
||||||
messageReflectionSyncPoint.signal();
|
messageReflectionSyncPoint.signal();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue