Skip to content

Commit 17999f9

Browse files
ilonatommyjkotas
andauthored
[mt][browser] SignalRClientTests avoid timeouts (#99303)
* Avoid closing server before client is closed. * Follow up for prev commit * Exit client only. * Remove blocking after merge. --------- Co-authored-by: Jan Kotas <[email protected]>
1 parent b48a797 commit 17999f9

File tree

3 files changed

+0
-10
lines changed

3 files changed

+0
-10
lines changed

src/mono/wasm/Wasm.Build.Tests/TestAppScenarios/SignalRClientTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public SignalRClientTests(ITestOutputHelper output, SharedBuildPerTestClassFixtu
2424
}
2525

2626
[ConditionalTheory(typeof(BuildTestBase), nameof(IsWorkloadWithMultiThreadingForDefaultFramework))]
27-
[ActiveIssue("https://github.com/dotnet/runtime/issues/99268", TestPlatforms.Windows)]
2827
[InlineData("Debug", "LongPolling")]
2928
[InlineData("Release", "LongPolling")]
3029
[InlineData("Debug", "WebSockets")]

src/mono/wasm/testassets/BlazorHostedApp/BlazorHosted.Client/Pages/Chat.razor

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,7 @@
8484

8585
private async Task SendExitSignal()
8686
{
87-
// exit the server
88-
await _hubConnection.SendAsync("Exit", 0);
8987
await DisposeHubConnection();
90-
Helper.TestOutputWriteLine($"Exit signal was sent by CurrentManagedThreadId={Environment.CurrentManagedThreadId}");
9188
// exit the client
9289
await JSRuntime.InvokeVoidAsync("eval", "import('./dotnet.js').then(module => { module.dotnet; module.exit(0); });");
9390
}

src/mono/wasm/testassets/BlazorHostedApp/BlazorHosted.Server/ChatHub.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,4 @@ public async Task SendMessage(string message, int sendingThreadId)
1212
string changedMessage = $"{message}-pong";
1313
await Clients.All.SendAsync("ReceiveMessage", changedMessage).ConfigureAwait(false);
1414
}
15-
16-
public void Exit(int code)
17-
{
18-
Console.WriteLine($"Received exit code {code} from client.");
19-
Environment.Exit(code);
20-
}
2115
}

0 commit comments

Comments
 (0)