Skip to content

Commit ee7bb6e

Browse files
committed
Update IntegrationTests.cs
1 parent 477f03d commit ee7bb6e

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/Tests/IntegrationTests.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,17 @@ public async Task Ensure_log_messages_are_redirected()
1717
var configuration = new EndpointConfiguration("Tests");
1818
configuration.UseTransport<LearningTransport>();
1919
configuration.UseSerialization<SystemJsonSerializer>();
20-
var endpoint = await Endpoint.Start(configuration);
20+
var cancel = TestContext.Current.CancellationToken;
21+
var endpoint = await Endpoint.Start(configuration, cancel);
2122

2223
var message = new MyMessage
2324
{
2425
DateSend = DateTime.Now,
2526
};
26-
await endpoint.SendLocal(message);
27-
await Task.Delay(500);
27+
await endpoint.SendLocal(message, cancellationToken: cancel);
28+
await Task.Delay(500, cancel);
2829
Assert.NotEmpty(LogMessageCapture.LoggingEvents);
29-
await endpoint.Stop();
30+
await endpoint.Stop(cancel);
3031
}
3132

3233
[Fact]

0 commit comments

Comments
 (0)