Skip to content

Commit f548028

Browse files
authored
CSHARP-5930: Stop throwing in test discovery when running locally (#1917)
Both EnsureNoUnobservedTaskException and EnsureNoUnobservedTaskException_Integration have the "UnobservedExceptionTracking" category. This means that the SingleOrDefault throws in test dicovery. I don't know that this is the correct fix, but it's a starting point.
1 parent bd64997 commit f548028

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/MongoDB.TestHelpers/XunitExtensions/TimeoutEnforcing/TimeoutEnforcingXunitTestAssemblyRunner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public TimeoutEnforcingXunitTestAssemblyRunner(
4141
executionMessageSink,
4242
executionOptions)
4343
{
44-
_unobservedExceptionTrackingTestCase = testCases.SingleOrDefault(IsUnobservedExceptionTrackingTestCase);
44+
_unobservedExceptionTrackingTestCase = testCases.FirstOrDefault(IsUnobservedExceptionTrackingTestCase);
4545
}
4646

4747
protected override Task<RunSummary> RunTestCollectionAsync(

0 commit comments

Comments
 (0)