-
Notifications
You must be signed in to change notification settings - Fork 516
Refactored some functional tests. #1561
Refactored some functional tests. #1561
Conversation
|
@MaherJendoubi, |
| $"Response Content-Length mismatch: too many bytes written (12 of 5).", | ||
| logMessage.Exception.Message); | ||
| "Response Content-Length mismatch: too many bytes written (12 of 5).", | ||
| logMessage?.Exception.Message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ? is unnecessary since the previous assert will fail if it can't find a log message.
| $"Response Content-Length mismatch: too many bytes written (12 of 5).", | ||
| logMessage.Exception.Message); | ||
| "Response Content-Length mismatch: too many bytes written (12 of 5).", | ||
| logMessage?.Exception.Message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ? is unnecessary since the previous assert will fail if it can't find a log message.
| $"Response Content-Length mismatch: too many bytes written (12 of 11).", | ||
| logMessage.Exception.Message); | ||
| "Response Content-Length mismatch: too many bytes written (12 of 11).", | ||
| logMessage?.Exception.Message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ? is unnecessary since the previous assert will fail if it can't find a log message.
| $"Response Content-Length mismatch: too many bytes written (12 of 11).", | ||
| logMessage.Exception.Message); | ||
| "Response Content-Length mismatch: too many bytes written (12 of 11).", | ||
| logMessage?.Exception.Message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ? is unnecessary since the previous assert will fail if it can't find a log message.
| var token = context.RequestAborted; | ||
| token.Register(() => requestAborted.Release(2)); | ||
| await requestAborted.WaitAsync().TimeoutAfter(TimeSpan.FromSeconds(10)); | ||
| await requestAborted.WaitAsync(token).TimeoutAfter(TimeSpan.FromSeconds(10)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't tie the semaphore to the cancellation token.
| var stop = Assert.Single(events, e => e.EventName == "ConnectionStop"); | ||
| Assert.All(new[] { "connectionId" }, p => Assert.Contains(p, stop.PayloadNames)); | ||
| Assert.Same(KestrelEventSource.Log, stop.EventSource); | ||
| Assert.Same(KestrelEventSource.Log, stop?.EventSource); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ? is unnecessary since Assert.Single will fail if it can't find the stop event.
|
@MaherJendoubi I would hold off any of these changes until #1551 is this. Can you close this PR and revisit after it is merged? |
|
@CesarBS Thanks a lot for the review. I learnt a lot. @davidfowl for sure. Thanks. |

No description provided.