Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit a6b1286

Browse files
committed
Upgrade test proj to net46, enable .NET Core + convert Explicit to Ignore
1 parent 41caad4 commit a6b1286

27 files changed

+36
-38
lines changed

tests/ServiceStack.Redis.Tests.Sentinel/Redis3SentinelSetupTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace ServiceStack.Redis.Tests.Sentinel
55
{
66
[TestFixture, Category("Integration")]
7-
[Explicit("Requires cloud setup")]
7+
[Ignore("Requires cloud setup")]
88
public class Redis3SentinelSetupTests
99
: RedisSentinelTestBase
1010
{

tests/ServiceStack.Redis.Tests/Benchmarks/DoubleSerializationBenchmarks.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace ServiceStack.Redis.Tests.Benchmarks
1010
{
11-
[TestFixture, Explicit]
11+
[TestFixture, Ignore("Benchmark")]
1212
public class DoubleSerializationBenchmarks
1313
{
1414
const int times = 100000;

tests/ServiceStack.Redis.Tests/DiagnosticTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace ServiceStack.Redis.Tests
77
{
8-
[Explicit("Diagnostic only Integration Test")]
8+
[Ignore("Diagnostic only Integration Test")]
99
[TestFixture]
1010
public class DiagnosticTests
1111
{

tests/ServiceStack.Redis.Tests/Examples/BestPractice/BlogPostBestPractice.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public List<T> Inject<T>(IEnumerable<T> entities)
273273
#endregion
274274

275275

276-
[TestFixture, Explicit, Category("Integration")]
276+
[TestFixture, Ignore("Integration"), Category("Integration")]
277277
public class BlogPostBestPractice
278278
{
279279
readonly RedisClient redisClient = new RedisClient(TestConfig.SingleHost);

tests/ServiceStack.Redis.Tests/Examples/BestPractice/BlogPostMigrations.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public enum BlogPostType
5252

5353
namespace ServiceStack.Redis.Tests.Examples.BestPractice
5454
{
55-
[TestFixture, Explicit, Category("Integration")]
55+
[TestFixture, Ignore("Integration"), Category("Integration")]
5656
public class BlogPostMigrations
5757
{
5858
readonly RedisClient redisClient = new RedisClient(TestConfig.SingleHost);

tests/ServiceStack.Redis.Tests/Examples/BlogPostExample.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class BlogPostComment
6464
}
6565

6666

67-
[TestFixture, Explicit, Category("Integration")]
67+
[TestFixture, Ignore("Integration"), Category("Integration")]
6868
public class BlogPostExample
6969
{
7070
readonly RedisClient redis = new RedisClient(TestConfig.SingleHost);

tests/ServiceStack.Redis.Tests/Examples/ServiceStack_Redis_UseCase.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace ServiceStack.Redis.Tests.Examples
66
{
7-
[TestFixture, Explicit]
7+
[TestFixture, Ignore("Integration")]
88
public class ServiceStack_Redis_UseCase
99
{
1010
public class Todo

tests/ServiceStack.Redis.Tests/Examples/SimpleExamples.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace ServiceStack.Redis.Tests.Examples
1010
{
11-
[TestFixture, Explicit, Category("Integration")]
11+
[TestFixture, Ignore("Integration"), Category("Integration")]
1212
public class SimpleExamples
1313
{
1414
readonly RedisClient redis = new RedisClient(TestConfig.SingleHost);

tests/ServiceStack.Redis.Tests/Examples/SimpleLocks.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace ServiceStack.Redis.Tests.Examples
99
{
10-
[TestFixture, Explicit, Category("Integration")]
10+
[TestFixture, Ignore("Integration"), Category("Integration")]
1111
public class SimpleLocks
1212
{
1313
[SetUp]

tests/ServiceStack.Redis.Tests/Examples/SimplePubSub.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace ServiceStack.Redis.Tests.Examples
88
{
9-
[TestFixture, Explicit, Category("Integration")]
9+
[TestFixture, Ignore("Integration"), Category("Integration")]
1010
public class SimplePubSub
1111
{
1212
const string ChannelName = "SimplePubSubCHANNEL";

tests/ServiceStack.Redis.Tests/Examples/TestData.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace ServiceStack.Redis.Tests.Examples
66
{
7-
[TestFixture, Explicit]
7+
[TestFixture, Ignore("Integration")]
88
public class TestData
99
: RedisClientTestsBase
1010
{

tests/ServiceStack.Redis.Tests/Examples/TodoApp.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace ServiceStack.Redis.Tests.Examples
44
{
5-
[TestFixture, Explicit, Category("Integration")]
5+
[TestFixture, Ignore("Integration"), Category("Integration")]
66
public class TodoApp
77
{
88
[SetUp]

tests/ServiceStack.Redis.Tests/Generic/RedisTypedClientTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public void Can_Expire()
7676
Assert.That(RedisTyped.GetById("key"), Is.Null);
7777
}
7878

79-
[Explicit("Changes in system clock can break test")]
79+
[Ignore("Changes in system clock can break test")]
8080
[Test]
8181
public void Can_ExpireAt()
8282
{

tests/ServiceStack.Redis.Tests/Integration/RedisRegressionTestRun.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public void onBeforeTestFixture()
2222
testData = TypeSerializer.SerializeToString(results);
2323
}
2424

25-
[Explicit("Can hang CI")]
25+
[Ignore("Can hang CI")]
2626
[Test]
2727
public void Can_support_64_threads_using_the_client_simultaneously()
2828
{

tests/ServiceStack.Redis.Tests/Issues/TransactionIssueTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ private void CheckConnection(object state)
112112
Task.Factory.StartNew(CheckThisConnection);
113113
}
114114

115-
[Explicit, Test]
115+
[Ignore("Integration"), Test]
116116
public void Can_queue_large_transaction()
117117
{
118118
var q = new System.Threading.Timer(CheckConnection, null, 30000, 2);

tests/ServiceStack.Redis.Tests/LicenseUsageTests.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void Throws_on_access_of_21_types()
4747
}
4848
}
4949

50-
[Test, Explicit("Takes too long - but works!")]
50+
[Test, Ignore("Takes too long - but works!")]
5151
public void Allows_access_of_6000_operations()
5252
{
5353
using (var client = new RedisClient(TestConfig.SingleHost))
@@ -56,7 +56,7 @@ public void Allows_access_of_6000_operations()
5656
}
5757
}
5858

59-
[Test, Explicit("Takes too long - but works!")]
59+
[Test, Ignore("Takes too long - but works!")]
6060
public void Throws_on_access_of_6100_operations()
6161
{
6262
using (var client = new RedisClient(TestConfig.SingleHost))
@@ -88,7 +88,7 @@ public void Allows_access_of_21_types()
8888
}
8989
}
9090

91-
[Test, Explicit("Takes too long - but works!")]
91+
[Test, Ignore("Takes too long - but works!")]
9292
public void Allows_access_of_6100_operations()
9393
{
9494
#if NETCORE

tests/ServiceStack.Redis.Tests/PooledRedisClientManagerTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ public void Does_throw_TimeoutException_when_PoolTimeout_exceeded()
404404
}
405405
}
406406

407-
//[Explicit,Ignore("tempromental integration test")]
407+
//[Ignore("tempromental integration test")]
408408
//[Test]
409409
//public void Can_support_64_threads_using_the_client_simultaneously()
410410
//{

tests/ServiceStack.Redis.Tests/RedisBenchmarkTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace ServiceStack.Redis.Tests
99
{
10-
[TestFixture, Explicit]
10+
[TestFixture, Ignore("Benchmark")]
1111
public class RedisBenchmarkTests
1212
: RedisClientTestsBase
1313
{
@@ -117,7 +117,7 @@ public void Compare_sort_nosort_to_smembers_mget()
117117
}
118118
}
119119

120-
[TestFixture, Explicit]
120+
[TestFixture, Ignore("Benchmark")]
121121
public class RawBytesSetBenchmark
122122
{
123123
public void Run(string name, int nBlockSizeBytes, Action<int, byte[]> fn)

tests/ServiceStack.Redis.Tests/RedisClientConfigTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace ServiceStack.Redis.Tests
99
public class RedisClientConfigTests
1010
: RedisClientTestsBase
1111
{
12-
[Explicit("Hurts MSOpenTech Redis Server")]
12+
[Ignore("Hurts MSOpenTech Redis Server")]
1313
[Test]
1414
public void Can_Set_and_Get_Config()
1515
{

tests/ServiceStack.Redis.Tests/RedisClientTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public void Can_Expire_Ms()
180180
Assert.That(Redis.ContainsKey("key"), Is.False);
181181
}
182182

183-
[Explicit("Changes in system clock can break test")]
183+
[Ignore("Changes in system clock can break test")]
184184
[Test]
185185
public void Can_ExpireAt()
186186
{

tests/ServiceStack.Redis.Tests/RedisGeoNativeClientTests.cs

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
namespace ServiceStack.Redis.Tests
55
{
66
[TestFixture]
7-
#if !NETCORE
8-
[Explicit, Ignore("CI requires redis-server v3.2.0")]
9-
#endif
7+
[Ignore("CI requires redis-server v3.2.0")]
108
public class RedisGeoNativeClientTests
119
{
1210
private readonly RedisNativeClient redis;

tests/ServiceStack.Redis.Tests/RedisGeoTests.cs

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
namespace ServiceStack.Redis.Tests
55
{
66
[TestFixture]
7-
#if !NETCORE
8-
[Explicit, Ignore("CI requires redis-server v3.2.0")]
9-
#endif
7+
[Ignore("CI requires redis-server v3.2.0")]
108
public class RedisGeoTests
119
{
1210
private readonly RedisClient redis;

tests/ServiceStack.Redis.Tests/RedisHyperLogTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace ServiceStack.Redis.Tests
66
{
7-
[TestFixture, Explicit]
7+
[TestFixture, Ignore("Integration")]
88
public class RedisHyperLogTests
99
{
1010
[Test]

tests/ServiceStack.Redis.Tests/RedisPasswordTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace ServiceStack.Redis.Tests
66
public class RedisPasswordTests
77
{
88

9-
[Explicit("Integration")]
9+
[Ignore("Integration")]
1010
[Test]
1111
public void Can_connect_to_Slaves_and_Masters_with_Password()
1212
{

tests/ServiceStack.Redis.Tests/RedisStatsTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public void OneTimeSetUp()
1414
}
1515

1616
[Test]
17-
[Explicit]
17+
[Ignore("too long")]
1818
public void Batch_and_Pipeline_requests_only_counts_as_1_request()
1919
{
2020
var reqCount = RedisNativeClient.RequestsPerHour;

tests/ServiceStack.Redis.Tests/ServiceStack.Redis.Tests.csproj

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net45;netcoreapp2.0</TargetFrameworks>
4+
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
55
<!--<TargetFrameworks>netcoreapp1.1</TargetFrameworks>-->
66
<DebugType>portable</DebugType>
77
<AssemblyName>ServiceStack.Redis.Tests</AssemblyName>
@@ -19,14 +19,16 @@
1919

2020
<ItemGroup>
2121
<ProjectReference Include="..\..\src\ServiceStack.Redis\ServiceStack.Redis.csproj" />
22-
<PackageReference Include="NUnit" Version="3.8.1" />
22+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
23+
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
24+
<PackageReference Include="NUnit" Version="3.9.0" />
2325
</ItemGroup>
2426

25-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
27+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net46' ">
2628
<DefineConstants>$(DefineConstants);NET45</DefineConstants>
2729
</PropertyGroup>
2830

29-
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
31+
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
3032
<Reference Include="System.Configuration" />
3133
<Reference Include="System.Threading" />
3234
<Reference Include="System.Threading.Tasks" />
@@ -56,7 +58,7 @@
5658
</PropertyGroup>
5759

5860
<ItemGroup Condition=" '$(NUNITLITE)' != '' ">
59-
<PackageReference Include="NUnitLite" Version="3.6.1" />
61+
<PackageReference Include="NUnitLite" Version="3.9.0" />
6062
</ItemGroup>
6163

6264
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">

tests/ServiceStack.Redis.Tests/TwemproxyTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace ServiceStack.Redis.Tests
55
{
6-
[TestFixture, Explicit]
6+
[TestFixture, Ignore("Integration")]
77
public class TwemproxyTests
88
{
99
[Test]

0 commit comments

Comments
 (0)