Skip to content

Commit a1e59c3

Browse files
committed
Reduce the timeout when waiting for a message - if we don't receive it in 20 seconds, we can assume it's not delivered.
1 parent c2983ac commit a1e59c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Assets/Plugins/StreamChat/Tests/StatefulClient/ChannelsModerationTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private async Task When_client_sends_message_shadowed_by_ai_moderation_expect_ot
3737
Assert.IsTrue(channel.Messages.Contains(normalMessage));
3838

3939
// Wait for other client to receive the message
40-
await WaitWhileFalseAsync(() => otherClientChannel.Messages.Any(m => m.Id == normalMessage.Id));
40+
await WaitWhileFalseAsync(() => otherClientChannel.Messages.Any(m => m.Id == normalMessage.Id), maxSeconds: 20);
4141

4242
Assert.IsNotNull(otherClientChannel.Messages.Single(m => m.Id == normalMessage.Id));
4343

@@ -54,7 +54,7 @@ private async Task When_client_sends_message_shadowed_by_ai_moderation_expect_ot
5454
Assert.IsTrue(channel.Messages.Contains(offensiveMessage));
5555

5656
// Wait for other client to receive the offensive message
57-
await WaitWhileFalseAsync(() => messagesReceivedOnOtherClient.Any(m => m.Message.Id == offensiveMessage.Id));
57+
await WaitWhileFalseAsync(() => messagesReceivedOnOtherClient.Any(m => m.Message.Id == offensiveMessage.Id), maxSeconds: 20);
5858

5959
// Other client should have the offensive message shadowed
6060
Assert.IsFalse(otherClientChannel.Messages.Any(m => m.Id == offensiveMessage.Id));

0 commit comments

Comments
 (0)