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
3 changes: 2 additions & 1 deletion src/Components/Ignitor/src/BlazorClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ public async Task<bool> ConnectAsync(Uri uri, bool connectAutomatically = true)
});

_hubConnection = builder.Build();
await HubConnection.StartAsync(CancellationToken);

HubConnection.On<int, string>("JS.AttachComponent", OnAttachComponent);
HubConnection.On<int, string, string>("JS.BeginInvokeJS", OnBeginInvokeJS);
Expand All @@ -357,6 +356,8 @@ public async Task<bool> ConnectAsync(Uri uri, bool connectAutomatically = true)
HubConnection.On<string>("JS.Error", OnError);
HubConnection.Closed += OnClosedAsync;

await HubConnection.StartAsync(CancellationToken);

if (!connectAutomatically)
{
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,10 @@
<Compile Include="$(RepoRoot)src\Shared\Components\ServerComponentMarker.cs" />
</ItemGroup>

<ItemGroup>
<None Update="xunit.runner.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Microsoft.AspNetCore.Components.RenderTree;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.SignalR.Client;
using Microsoft.AspNetCore.Testing;
using Microsoft.Extensions.Logging;
using TestServer;
using Xunit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ protected virtual Task InitializeAsync()
return Task.CompletedTask;
}

protected virtual Task DisposeAsync()
protected async virtual Task DisposeAsync()
{
if (TestSink != null)
{
TestSink.MessageLogged -= TestSink_MessageLogged;
}

return Task.CompletedTask;
await Client.DisposeAsync();
}

private void TestSink_MessageLogged(WriteContext context)
Expand Down
7 changes: 7 additions & 0 deletions src/Components/test/E2ETest/xunit.runner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// This is set to -1 to allow the usage of an
// unlimited ammount of threads.
"maxParallelThreads": -1,
"diagnosticMessages": true,
"longRunningTestSeconds": 30
}