Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mono/wasm/Wasm.Build.Tests/Blazor/AssetCachingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public async Task BlazorApp_BasedOnFingerprinting_LoadsWasmAssetsFromCache()
await page.GotoAsync($"{baseUrl}counter");
await counterLoaded.Task;

var requestLogClient = new BlazorWebWasmLogClient(baseUrl);
using var requestLogClient = new BlazorWebWasmLogClient(baseUrl);
var firstLoadRequestLogs = await requestLogClient.GetRequestLogsAsync();
var firstLoadWasmRequests = firstLoadRequestLogs.Where(log => log.Path.EndsWith(".wasm"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Wasm.Build.Tests.Blazor;
/// <summary>
/// Client for interacting with the request log API exposed by the BlazorWebWasm test server app.
/// </summary>
internal class BlazorWebWasmLogClient
internal class BlazorWebWasmLogClient : IDisposable
{
private readonly HttpClient _httpClient;

Expand All @@ -36,4 +36,9 @@ public async Task ClearRequestLogsAsync()
var response = await _httpClient.DeleteAsync("request-logs");
response.EnsureSuccessStatusCode();
}

public void Dispose()
{
_httpClient?.Dispose();
}
}