Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that the TTBR tests do not end just after the feature startup is done #7062

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ public class When_TimeToBeReceived_has_expired : NServiceBusAcceptanceTest
[Test]
public async Task Message_should_not_be_received()
{
var start = DateTime.UtcNow;

var context = await Scenario.Define<Context>()
.WithEndpoint<Endpoint>()
.Run(TimeSpan.FromSeconds(10));
.Done(c => c.WasCalled || DateTime.UtcNow - start > TimeSpan.FromSeconds(15))
.Run();

Assert.IsFalse(context.WasCalled);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ public class When_TimeToBeReceived_has_expired_convention : NServiceBusAcceptanc
[Test]
public async Task Message_should_not_be_received()
{
var start = DateTime.UtcNow;

var context = await Scenario.Define<Context>()
.WithEndpoint<Endpoint>()
.Run(TimeSpan.FromSeconds(10));
.Done(c => c.WasCalled || DateTime.UtcNow - start > TimeSpan.FromSeconds(15))
.Run();

Assert.IsFalse(context.WasCalled);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ public class When_TimeToBeReceived_used_with_unobtrusive_mode : NServiceBusAccep
[Test]
public async Task Message_should_not_be_received()
{
var start = DateTime.UtcNow;

var context = await Scenario.Define<Context>()
.WithEndpoint<Endpoint>()
.Run(TimeSpan.FromSeconds(10));
.Done(c => c.WasCalled || DateTime.UtcNow - start > TimeSpan.FromSeconds(15))
.Run();

Assert.IsFalse(context.WasCalled);
}
Expand Down