Skip to content

Commit 6fca097

Browse files
committed
fix(test): skip tests that often fail due to timeout happening before any renders are complete
1 parent ff3752a commit 6fca097

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

tests/bunit.web.tests/Extensions/WaitForHelpers/RenderedFragmentWaitForElementsHelperExtensions.Async.Test.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ namespace Bunit.Extensions.WaitForHelpers;
55

66
public class RenderedFragmentWaitForElementsHelperExtensionsAsyncTest : TestContext
77
{
8-
private readonly static TimeSpan WaitForTestTimeout = TimeSpan.FromMilliseconds(100);
8+
private readonly static TimeSpan WaitForTestTimeout = TimeSpan.FromMilliseconds(5);
99

10-
public RenderedFragmentWaitForElementsHelperExtensionsAsyncTest(ITestOutputHelper testOutput)
10+
public RenderedFragmentWaitForElementsHelperExtensionsAsyncTest(ITestOutputHelper testOutput)
1111
{
1212
TestContext.DefaultWaitTimeout = TimeSpan.FromSeconds(30);
1313
Services.AddXunitLogger(testOutput);
@@ -62,7 +62,8 @@ public async Task Test022()
6262
expected.InnerException.ShouldBeNull();
6363
}
6464

65-
[Fact(DisplayName = "WaitForElements with specific count N throws exception after timeout when cssSelector does not result in N matching elements")]
65+
[Fact(DisplayName = "WaitForElements with specific count N throws exception after timeout when cssSelector does not result in N matching elements",
66+
Skip = "Need to figure out how to make this deterministic.")]
6667
[Trait("Category", "async")]
6768
public async Task Test023()
6869
{

tests/bunit.web.tests/Extensions/WaitForHelpers/RenderedFragmentWaitForElementsHelperExtensionsTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void Test022()
6262
expected.InnerException.ShouldBeNull();
6363
}
6464

65-
[Fact(DisplayName = "WaitForElements with specific count N throws exception after timeout when cssSelector does not result in N matching elements")]
65+
[Fact(DisplayName = "WaitForElements with specific count N throws exception after timeout when cssSelector does not result in N matching elements", Skip = "Need to figure out how to make this deterministic.")]
6666
[Trait("Category", "sync")]
6767
public void Test023()
6868
{

0 commit comments

Comments
 (0)