Skip to content

Commit

Permalink
we are speed
Browse files Browse the repository at this point in the history
  • Loading branch information
MWO1024 committed Dec 5, 2024
1 parent 11e96b3 commit 52fdb57
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/IntegrationTests/Behaviours/BehavioursTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,16 +362,25 @@ protected async Task<List<PeekResultDto>> WhenActorPeeksAllMessages(ActorNumber
var timeoutAt = DateTime.UtcNow.AddMinutes(1);
while (DateTime.UtcNow < timeoutAt)
{
var thereWasNothingToPeek = true;
foreach (var messageCategory in EnumerationType.GetAll<MessageCategory>())
{
var peekResult = await WhenActorPeeksMessage(actorNumber, actorRole, documentFormat, messageCategory);

if (peekResult is null)
{
break;
}

thereWasNothingToPeek = false;
peekResults.Add(peekResult);
await WhenActorDequeuesMessage(peekResult.MessageId.Value, actorNumber, actorRole);
}

if (thereWasNothingToPeek)
{
break;
}
}

return peekResults;
Expand Down

0 comments on commit 52fdb57

Please sign in to comment.