parent
0dd7477501
commit
9f0edefd16
|
|
@ -13,8 +13,6 @@ using Xunit;
|
||||||
namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
||||||
{
|
{
|
||||||
public partial class WebSocketConnectionTests
|
public partial class WebSocketConnectionTests
|
||||||
{
|
|
||||||
public class ConnectionLifecycle
|
|
||||||
{
|
{
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task SendReceiveFrames()
|
public async Task SendReceiveFrames()
|
||||||
|
|
@ -167,5 +165,4 @@ namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,20 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using Microsoft.AspNetCore.SignalR.Tests.Common;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO.Pipelines;
|
using System.IO.Pipelines;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.SignalR.Tests.Common;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using Microsoft.AspNetCore.Testing.xunit;
|
|
||||||
|
|
||||||
namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
||||||
{
|
{
|
||||||
public partial class WebSocketConnectionTests
|
public partial class WebSocketConnectionTests
|
||||||
{
|
{
|
||||||
public class PingPongBehavior
|
[Fact]
|
||||||
{
|
|
||||||
[ConditionalFact]
|
|
||||||
[SkipIfEnvVarPresent("TRAVIS", "This test times out a lot on Travis because of slow performance/threading issues")]
|
|
||||||
public async Task AutomaticPingTransmission()
|
public async Task AutomaticPingTransmission()
|
||||||
{
|
{
|
||||||
var startTime = DateTime.UtcNow;
|
var startTime = DateTime.UtcNow;
|
||||||
|
|
@ -103,5 +99,4 @@ namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,6 @@ using Xunit;
|
||||||
namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
||||||
{
|
{
|
||||||
public partial class WebSocketConnectionTests
|
public partial class WebSocketConnectionTests
|
||||||
{
|
|
||||||
public class ProtocolErrors
|
|
||||||
{
|
{
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData(new byte[] { 0x11, 0x00 })]
|
[InlineData(new byte[] { 0x11, 0x00 })]
|
||||||
|
|
@ -245,5 +243,4 @@ namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,6 @@ using Xunit;
|
||||||
namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
||||||
{
|
{
|
||||||
public partial class WebSocketConnectionTests
|
public partial class WebSocketConnectionTests
|
||||||
{
|
|
||||||
public class TheReceiveAsyncMethod
|
|
||||||
{
|
{
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData(new byte[] { 0x81, 0x00 }, "", true)]
|
[InlineData(new byte[] { 0x81, 0x00 }, "", true)]
|
||||||
|
|
@ -191,7 +189,6 @@ namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
||||||
Assert.Equal(expectedOpcode, frame.Opcode);
|
Assert.Equal(expectedOpcode, frame.Opcode);
|
||||||
payloadAssert(frame.Payload.ToArray());
|
payloadAssert(frame.Payload.ToArray());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private static async Task<WebSocketConnectionSummary> RunReceiveTest(Func<IPipeWriter, CancellationToken, Task> producer)
|
private static async Task<WebSocketConnectionSummary> RunReceiveTest(Func<IPipeWriter, CancellationToken, Task> producer)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,6 @@ using Xunit;
|
||||||
namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
||||||
{
|
{
|
||||||
public partial class WebSocketConnectionTests
|
public partial class WebSocketConnectionTests
|
||||||
{
|
|
||||||
public class TheSendAsyncMethod
|
|
||||||
{
|
{
|
||||||
// No auto-pinging for us!
|
// No auto-pinging for us!
|
||||||
private readonly static WebSocketOptions DefaultTestOptions = new WebSocketOptions().WithAllFramesPassedThrough();
|
private readonly static WebSocketOptions DefaultTestOptions = new WebSocketOptions().WithAllFramesPassedThrough();
|
||||||
|
|
@ -205,5 +203,4 @@ namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,6 @@ using Xunit;
|
||||||
namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
||||||
{
|
{
|
||||||
public partial class WebSocketConnectionTests
|
public partial class WebSocketConnectionTests
|
||||||
{
|
|
||||||
public class Utf8Validation
|
|
||||||
{
|
{
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData(new byte[] { 0x48, 0x65, 0x6C, 0x6C, 0x6F }, "Hello")]
|
[InlineData(new byte[] { 0x48, 0x65, 0x6C, 0x6C, 0x6F }, "Hello")]
|
||||||
|
|
@ -223,5 +221,4 @@ namespace Microsoft.Extensions.WebSockets.Internal.Tests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue