We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7980b23 commit b0c48d6Copy full SHA for b0c48d6
BitFaster.Caching.UnitTests/Atomic/AsyncAtomicFactoryTests.cs
@@ -96,7 +96,15 @@ public async Task WhenValueCreateThrowsDoesNotCauseUnobservedTaskException()
96
97
void OnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
98
{
99
- unobservedExceptionThrown = true;
+ if (e.Exception?.InnerException is ArithmeticException)
100
+ {
101
+ unobservedExceptionThrown = true;
102
+ }
103
+ else
104
105
+ Assert.Fail(e.Exception?.ToString());
106
107
+
108
e.SetObserved();
109
}
110
@@ -110,6 +118,8 @@ static async Task AsyncAtomicFactoryGetValueAsync()
118
catch (ArithmeticException)
111
119
112
120
121
122
+ await a.GetValueAsync(12, (i) => Task.FromResult(24));
113
123
114
124
115
125
0 commit comments