mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-18 15:23:47 +01:00
Fix WithWebSocketProxy_Should_Proxy_Binary_Messages
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user