Skip to content

Commit

Permalink
[sinttest] Do not use Java stream() API to check if MUC status is set
Browse files Browse the repository at this point in the history
MUCUser.getStatus() returns a set, checking if a particular MUC status
number is set should be done via a simple and efficient set operation
and not by resorting to using Java's stream API.
  • Loading branch information
Flowdalic committed May 20, 2024
1 parent 482a117 commit 2a243fe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ public void mucJoinRoomWithPublicLoggingTest() throws Exception {
.submitConfigurationForm();

Presence twoPresence = mucAsSeenByTwo.join(nicknameTwo);
assertTrue(MUCUser.from(twoPresence).getStatus().stream().anyMatch(status -> 170 == status.getCode()),
assertTrue(MUCUser.from(twoPresence).getStatus().contains(MUCUser.Status.create(170)),
"Expected initial presence reflected to '" + conTwo.getUser() + "' when joining room '" + mucAddress + "' to include the status code '170' (but it did not).");
} catch (MucConfigurationNotSupportedException e) {
throw new TestNotPossibleException(e);
Expand Down

0 comments on commit 2a243fe

Please sign in to comment.