Fix WithWebSocketProxy_Should_Proxy_Binary_Messages

This commit is contained in:
Stef Heyenrath
2026-03-14 10:39:04 +01:00
parent ca788cb9b0
commit c4caa25eb6

View File

@@ -769,7 +769,7 @@ public class WebSocketIntegrationTests(ITestOutputHelper output, ITestContextAcc
public async Task WithWebSocketProxy_Should_Proxy_Binary_Messages()
{
// Arrange - Start target echo server
using var exampleEchoServer = WireMockServer.Start(new WireMockServerSettings
var exampleEchoServer = WireMockServer.Start(new WireMockServerSettings
{
Logger = new TestOutputHelperWireMockLogger(output),
Urls = ["ws://localhost:0"]
@@ -785,7 +785,7 @@ public class WebSocketIntegrationTests(ITestOutputHelper output, ITestContextAcc
);
// Arrange - Start proxy server
using var sut = WireMockServer.Start(new WireMockServerSettings
var sut = WireMockServer.Start(new WireMockServerSettings
{
Logger = new TestOutputHelperWireMockLogger(output),
Urls = ["ws://localhost:0"]
@@ -819,6 +819,14 @@ public class WebSocketIntegrationTests(ITestOutputHelper output, ITestContextAcc
receivedData.Should().BeEquivalentTo(testData, "binary data should be proxied and echoed back");
await client.CloseAsync(WebSocketCloseStatus.NormalClosure, "Test complete", _ct);
await Task.Delay(250, _ct);
sut.Stop();
sut.Dispose();
exampleEchoServer.Stop();
exampleEchoServer.Dispose();
}
[Fact]