Skip to content

Commit 480a72a

Browse files
csharpfritzCopilot
andcommitted
fix: increase SelectMethodAsync test timeout from 2s to 5s
Prevents flaky failures on slow CI runners where async data loading may not complete within 2 seconds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f841d77 commit 480a72a

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,3 +357,4 @@ planning-docs/ASPX-MIDDLEWARE-FEASIBILITY.md
357357
.squad-workstream
358358
site/
359359
samples/ZavaLoanPortal
360+
samples/AfterZavaLoanPortal/watch.ps1

src/BlazorWebFormsComponents.Test/DataBoundComponent/SelectMethodAsyncTest.razor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
);
2626

2727
// Wait for async data to load and re-render
28-
cut.WaitForState(() => cut.FindAll("tbody tr").Count > 1, TimeSpan.FromSeconds(2));
28+
cut.WaitForState(() => cut.FindAll("tbody tr").Count > 1, TimeSpan.FromSeconds(5));
2929

3030
_asyncCallCount.ShouldBeGreaterThanOrEqualTo(1, "SelectMethodAsync should be invoked");
3131
cut.FindAll("tbody tr").Count.ShouldBe(4, "Data from SelectMethodAsync should render");
@@ -49,7 +49,7 @@
4949
);
5050

5151
// Wait for async data to load
52-
cut.WaitForState(() => _asyncCallCount >= 1, TimeSpan.FromSeconds(2));
52+
cut.WaitForState(() => _asyncCallCount >= 1, TimeSpan.FromSeconds(5));
5353

5454
_asyncCallCount.ShouldBeGreaterThanOrEqualTo(1, "SelectMethodAsync should be invoked");
5555
_syncCallCount.ShouldBe(0, "Sync SelectMethod should NOT be invoked when async is set");
@@ -75,7 +75,7 @@
7575
);
7676

7777
// Wait for async data to load
78-
cut.WaitForState(() => _asyncCallCount >= 1, TimeSpan.FromSeconds(2));
78+
cut.WaitForState(() => _asyncCallCount >= 1, TimeSpan.FromSeconds(5));
7979

8080
_asyncCallCount.ShouldBeGreaterThanOrEqualTo(1);
8181
cut.Find("tbody tr td").TextContent.ShouldContain("AsyncItem");

0 commit comments

Comments
 (0)