Skip to content
Merged
Changes from 1 commit
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
13 changes: 13 additions & 0 deletions src/Components/Server/test/Circuits/RemoteRendererTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Microsoft.AspNetCore.Components.Server;
using Microsoft.AspNetCore.Components.Server.Circuits;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.InternalTesting;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -126,6 +127,7 @@ public async Task ProducesNewBatch_WhenABatchGetsAcknowledged()
}

[Fact]
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/61807")]
public async Task ProcessBufferedRenderBatches_WritesRenders()
{
// Arrange
Expand Down Expand Up @@ -767,6 +769,17 @@ public Task SetParametersAsync(ParameterView parameters)
public void TriggerRender()
{
var task = _renderHandle.Dispatcher.InvokeAsync(() => _renderHandle.Render(_renderFragment));

// TODO: Remove the following block once ProcessBufferedRenderBatches_WritesRenders is fixed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? Can't we keep this message for all the tests in case of failure?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we could. I didn't want to add anything into the "standard code path". But since its just test code, why not.

if (!task.IsCompletedSuccessfully)
{
// Log the task state for debugging purposes.
var status = task.Status;
var innerException = task.Exception?.InnerException;
var message = $"Render task should succeed synchronously.\nStatus: '{status}'\nInner exception: '{innerException}'";
Assert.True(task.IsCompletedSuccessfully, message);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not really the "fix" for this. We need to find where it is going async.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it is definitely not a fix. It is meant to help diagnosing the problem (as it is difficult to reproduce on demand).

Assert.True(task.IsCompletedSuccessfully);
Copy link

Copilot AI Sep 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The assertion on line 783 is redundant since line 780 already performs the same check. Remove the duplicate assertion to avoid confusion and reduce code duplication.

Suggested change
Assert.True(task.IsCompletedSuccessfully);

Copilot uses AI. Check for mistakes.

}
}
Expand Down
Loading