Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-pajurek committed Oct 16, 2024
1 parent 17b71cf commit 0e8d771
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions tests/Tests/ServiceBus/ServiceBusReceiverTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -355,22 +355,14 @@ public async Task Received_Message_Should_Return_If_There_Are_Some_Messages_Even

receivedMessagesBeforeSend.Should().BeEmpty();

var start = Stopwatch.GetTimestamp();

var receiveTask = receiver.ReceiveMessageAsync(TimeSpan.FromMinutes(10));


await Task.Delay(500);

await Task.Delay(500); // Give some time for the ReceiveMessage to really start.

await sender.SendMessagesAsync([message]);

var receivedMessage = await receiveTask;

var elapsed = Stopwatch.GetElapsedTime(start);

elapsed.Should().BeLessThan(TimeSpan.FromMinutes(1));

receivedMessage.Body.ToString().Should().Be("Test payload.");

}
Expand Down

0 comments on commit 0e8d771

Please sign in to comment.