fix #273 by grouping websocket tests (#278)

This commit is contained in:
Andrew Stanton-Nurse 2017-03-09 14:28:24 -08:00 committed by GitHub
parent 0dd7477501
commit 9f0edefd16
6 changed files with 894 additions and 914 deletions

View File

@ -13,8 +13,6 @@ using Xunit;
namespace Microsoft.Extensions.WebSockets.Internal.Tests
{
public partial class WebSocketConnectionTests
{
public class ConnectionLifecycle
{
[Fact]
public async Task SendReceiveFrames()
@ -168,4 +166,3 @@ namespace Microsoft.Extensions.WebSockets.Internal.Tests
}
}
}
}

View File

@ -1,24 +1,20 @@
// 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.
using Microsoft.AspNetCore.SignalR.Tests.Common;
using System;
using System.Globalization;
using System.IO.Pipelines;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.SignalR.Tests.Common;
using Xunit;
using Microsoft.AspNetCore.Testing.xunit;
namespace Microsoft.Extensions.WebSockets.Internal.Tests
{
public partial class WebSocketConnectionTests
{
public class PingPongBehavior
{
[ConditionalFact]
[SkipIfEnvVarPresent("TRAVIS", "This test times out a lot on Travis because of slow performance/threading issues")]
[Fact]
public async Task AutomaticPingTransmission()
{
var startTime = DateTime.UtcNow;
@ -104,4 +100,3 @@ namespace Microsoft.Extensions.WebSockets.Internal.Tests
}
}
}
}

View File

@ -11,8 +11,6 @@ using Xunit;
namespace Microsoft.Extensions.WebSockets.Internal.Tests
{
public partial class WebSocketConnectionTests
{
public class ProtocolErrors
{
[Theory]
[InlineData(new byte[] { 0x11, 0x00 })]
@ -246,4 +244,3 @@ namespace Microsoft.Extensions.WebSockets.Internal.Tests
}
}
}
}

View File

@ -12,8 +12,6 @@ using Xunit;
namespace Microsoft.Extensions.WebSockets.Internal.Tests
{
public partial class WebSocketConnectionTests
{
public class TheReceiveAsyncMethod
{
[Theory]
[InlineData(new byte[] { 0x81, 0x00 }, "", true)]
@ -191,7 +189,6 @@ namespace Microsoft.Extensions.WebSockets.Internal.Tests
Assert.Equal(expectedOpcode, frame.Opcode);
payloadAssert(frame.Payload.ToArray());
}
}
private static async Task<WebSocketConnectionSummary> RunReceiveTest(Func<IPipeWriter, CancellationToken, Task> producer)
{

View File

@ -12,8 +12,6 @@ using Xunit;
namespace Microsoft.Extensions.WebSockets.Internal.Tests
{
public partial class WebSocketConnectionTests
{
public class TheSendAsyncMethod
{
// No auto-pinging for us!
private readonly static WebSocketOptions DefaultTestOptions = new WebSocketOptions().WithAllFramesPassedThrough();
@ -206,4 +204,3 @@ namespace Microsoft.Extensions.WebSockets.Internal.Tests
}
}
}
}

View File

@ -11,8 +11,6 @@ using Xunit;
namespace Microsoft.Extensions.WebSockets.Internal.Tests
{
public partial class WebSocketConnectionTests
{
public class Utf8Validation
{
[Theory]
[InlineData(new byte[] { 0x48, 0x65, 0x6C, 0x6C, 0x6F }, "Hello")]
@ -224,4 +222,3 @@ namespace Microsoft.Extensions.WebSockets.Internal.Tests
}
}
}
}