File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ]
You can’t perform that action at this time.
0 commit comments