Skip to content

Commit 8a5844f

Browse files
committed
Skip slow tests
1 parent ae57936 commit 8a5844f

File tree

5 files changed

+49
-5
lines changed

5 files changed

+49
-5
lines changed

Tempest.Tests/ConnectionProviderTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ public void Stress()
499499
}
500500

501501
[Test, Repeat (3)]
502+
[SlowTest]
502503
public void StressConcurrentSends()
503504
{
504505
var c = GetNewClientConnection();
@@ -621,6 +622,7 @@ public void ConnectionFailed()
621622
}
622623

623624
[Test, Repeat (3)]
625+
[SlowTest]
624626
public void StressRandomLongAuthenticatedMessage()
625627
{
626628
var c = GetNewClientConnection();

Tempest.Tests/NetworkProviderTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ public void ConnectionLimitRestartListening()
165165
}
166166

167167
[Test, Repeat (3)]
168+
[SlowTest]
168169
public void PingPong()
169170
{
170171
AsyncTest test = new AsyncTest();

Tempest.Tests/SlowTestAttribute.cs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
//
2+
// ConnectionProviderTests.cs
3+
//
4+
// Author:
5+
// Eric Maupin <[email protected]>
6+
//
7+
// Copyright (c) 2011-2013 Eric Maupin
8+
//
9+
// Permission is hereby granted, free of charge, to any person obtaining a copy
10+
// of this software and associated documentation files (the "Software"), to deal
11+
// in the Software without restriction, including without limitation the rights
12+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
// copies of the Software, and to permit persons to whom the Software is
14+
// furnished to do so, subject to the following conditions:
15+
//
16+
// The above copyright notice and this permission notice shall be included in
17+
// all copies or substantial portions of the Software.
18+
//
19+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25+
// THE SOFTWARE.
26+
27+
using System;
28+
using NUnit.Framework;
29+
30+
namespace Tempest.Tests
31+
{
32+
#if NO_SLOW_TESTS
33+
public class SlowTestAttribute : IgnoreAttribute
34+
{
35+
public SlowTestAttribute() : base("Too slow") {}
36+
}
37+
#else
38+
public class SlowTestAttribute : Attribute { }
39+
#endif
40+
}

Tempest.Tests/Tempest.Tests.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net5.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

9+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
10+
<DefineConstants>TRACE;NO_SLOW_TESTS</DefineConstants>
11+
<WarningLevel>4</WarningLevel>
12+
</PropertyGroup>
13+
914
<ItemGroup>
1015
<PackageReference Include="nunit" Version="3.12.0" />
1116
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />

Tempest/ObjectSerializer.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@
3636
using System.Collections.Concurrent;
3737
using System.Runtime.Serialization.Formatters.Binary;
3838

39-
#if !SAFE
40-
using System.Reflection.Emit;
41-
#endif
42-
4339
namespace Tempest
4440
{
4541
internal class ObjectSerializer

0 commit comments

Comments
 (0)