Skip to content

Commit a3e7bce

Browse files
committed
Stabilize VFS concurrency tests
1 parent 337ef77 commit a3e7bce

3 files changed

Lines changed: 22 additions & 10 deletions

File tree

Tests/ManagedCode.Storage.Tests/Storages/Browser/BrowserServerVfsIntegrationTests.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ public async Task BrowserStorage_ServerHost_VfsLargeFlow_ShouldPersistAcrossPage
8787
[Fact]
8888
public async Task BrowserStorage_ServerHost_VfsConcurrentTabs_ShouldPersistAllFiles()
8989
{
90+
const float concurrentOperationTimeoutMs = 90000;
9091
await using var context = await fixture.CreateContextAsync();
9192
var firstPage = await context.NewPageAsync();
9293
var secondPage = await context.NewPageAsync();
@@ -105,11 +106,15 @@ public async Task BrowserStorage_ServerHost_VfsConcurrentTabs_ShouldPersistAllFi
105106
await BrowserStoragePage.FillVfsInputsAsync(secondPage, directory, secondFileName, secondMovedFileName, secondContent);
106107

107108
await Task.WhenAll(
108-
firstPage.ClickAsync("#vfs-save-text-button"),
109-
secondPage.ClickAsync("#vfs-save-text-button"));
110-
111-
await Expect(firstPage.Locator("#vfs-status-output")).ToContainTextAsync($"vfs-saved:/{directory}/{firstFileName}");
112-
await Expect(secondPage.Locator("#vfs-status-output")).ToContainTextAsync($"vfs-saved:/{directory}/{secondFileName}");
109+
firstPage.ClickAsync("#vfs-save-text-button", new() { Timeout = concurrentOperationTimeoutMs }),
110+
secondPage.ClickAsync("#vfs-save-text-button", new() { Timeout = concurrentOperationTimeoutMs }));
111+
112+
await Expect(firstPage.Locator("#vfs-status-output")).ToContainTextAsync(
113+
$"vfs-saved:/{directory}/{firstFileName}",
114+
new() { Timeout = concurrentOperationTimeoutMs });
115+
await Expect(secondPage.Locator("#vfs-status-output")).ToContainTextAsync(
116+
$"vfs-saved:/{directory}/{secondFileName}",
117+
new() { Timeout = concurrentOperationTimeoutMs });
113118

114119
await BrowserStoragePage.OpenPlaygroundAsync(verificationPage);
115120
await verificationPage.FillAsync("#vfs-directory-input", directory);

Tests/ManagedCode.Storage.Tests/Storages/Browser/BrowserWasmVfsIntegrationTests.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ public async Task BrowserStorage_WasmHost_VfsLargeFlow_ShouldPersistAcrossPages(
8787
[Fact]
8888
public async Task BrowserStorage_WasmHost_VfsConcurrentTabs_ShouldPersistAllFiles()
8989
{
90+
const float concurrentOperationTimeoutMs = 90000;
9091
await using var context = await fixture.CreateContextAsync();
9192
var firstPage = await context.NewPageAsync();
9293
var secondPage = await context.NewPageAsync();
@@ -105,11 +106,15 @@ public async Task BrowserStorage_WasmHost_VfsConcurrentTabs_ShouldPersistAllFile
105106
await BrowserStoragePage.FillVfsInputsAsync(secondPage, directory, secondFileName, secondMovedFileName, secondContent);
106107

107108
await Task.WhenAll(
108-
firstPage.ClickAsync("#vfs-save-text-button"),
109-
secondPage.ClickAsync("#vfs-save-text-button"));
110-
111-
await Expect(firstPage.Locator("#vfs-status-output")).ToContainTextAsync($"vfs-saved:/{directory}/{firstFileName}");
112-
await Expect(secondPage.Locator("#vfs-status-output")).ToContainTextAsync($"vfs-saved:/{directory}/{secondFileName}");
109+
firstPage.ClickAsync("#vfs-save-text-button", new() { Timeout = concurrentOperationTimeoutMs }),
110+
secondPage.ClickAsync("#vfs-save-text-button", new() { Timeout = concurrentOperationTimeoutMs }));
111+
112+
await Expect(firstPage.Locator("#vfs-status-output")).ToContainTextAsync(
113+
$"vfs-saved:/{directory}/{firstFileName}",
114+
new() { Timeout = concurrentOperationTimeoutMs });
115+
await Expect(secondPage.Locator("#vfs-status-output")).ToContainTextAsync(
116+
$"vfs-saved:/{directory}/{secondFileName}",
117+
new() { Timeout = concurrentOperationTimeoutMs });
113118

114119
await BrowserStoragePage.OpenPlaygroundAsync(verificationPage);
115120
await verificationPage.FillAsync("#vfs-directory-input", directory);

azure-upload-package-refresh.plan.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,5 @@
5757
- `dotnet list ManagedCode.Storage.slnx package --outdated`: no outdated direct packages.
5858
- `dotnet list ManagedCode.Storage.slnx package --vulnerable --include-transitive`: no vulnerable packages.
5959
- `dotnet build ManagedCode.Storage.slnx --configuration Release`: passed with 0 warnings and 0 errors.
60+
- Initial release run `31951722155`: Browser Stress passed; Build and Test exposed a 30-second Playwright action timeout in the WASM VFS concurrent-tabs test before packaging.
61+
- Focused WASM and Server VFS concurrent-tabs retry after applying a 90-second concurrent-operation wait budget: 2 passed, 0 failed; assertions remain unchanged.

0 commit comments

Comments
 (0)