Skip to content

Commit 054ecd2

Browse files
committed
test: set timeout higher for tests that sometimes fails on GA/windows.
closes #373
1 parent 9b293a4 commit 054ecd2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/bunit.core.tests/Extensions/WaitForHelpers/RenderedFragmentWaitForHelperExtensionsTest.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,19 @@ public void Test300()
121121
{
122122
var cut = RenderComponent<ThrowsAfterAsyncOperation>();
123123

124+
// Adding additional wait time to deal with tests sometimes failing for timeout on Windows.
124125
Should.Throw<ThrowsAfterAsyncOperation.ThrowsAfterAsyncOperationException>(
125-
() => cut.WaitForAssertion(() => false.ShouldBeTrue()));
126+
() => cut.WaitForAssertion(() => false.ShouldBeTrue(), TimeSpan.FromSeconds(5)));
126127
}
127128

128129
[Fact(DisplayName = "WaitForState rethrows unhandled exception from components async operation's methods")]
129130
public void Test301()
130131
{
131132
var cut = RenderComponent<ThrowsAfterAsyncOperation>();
132133

134+
// Adding additional wait time to deal with tests sometimes failing for timeout on Windows.
133135
Should.Throw<ThrowsAfterAsyncOperation.ThrowsAfterAsyncOperationException>(
134-
() => cut.WaitForState(() => false));
136+
() => cut.WaitForState(() => false, TimeSpan.FromSeconds(5)));
135137
}
136138

137139
internal class ThrowsAfterAsyncOperation : ComponentBase

0 commit comments

Comments
 (0)