Commit b872f9d7 authored by Jeremy Meng's avatar Jeremy Meng

Disable BookSleeve tests for dnxcore.

parent 4074eadd
......@@ -2,7 +2,9 @@
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
#if FEATURE_BOOKSLEEVE
using BookSleeve;
#endif
using NUnit.Framework;
using StackExchange.Redis.KeyspaceIsolation;
namespace StackExchange.Redis.Tests
......@@ -340,6 +342,7 @@ public void GetWithExpiryWrongTypeSync()
Assert.That(ex.Message.Equals("WRONGTYPE Operation against a key holding the wrong kind of value"));
}
#if FEATURE_BOOKSLEEVE
[Test]
[TestCase(true, true, ResultCompletionMode.ConcurrentIfContinuation)]
[TestCase(true, false, ResultCompletionMode.ConcurrentIfContinuation)]
......@@ -389,7 +392,7 @@ public void MassiveBulkOpsAsyncOldStyle(bool withContinuation, bool suspendFlush
completionMode, AsyncOpsQty / watch.Elapsed.TotalSeconds);
}
}
#endif
[Test]
[TestCase(true, 1)]
......@@ -434,6 +437,8 @@ public void MassiveBulkOpsSync(bool preserveOrder, int threads)
#endif
}
}
#if FEATURE_BOOKSLEEVE
[Test]
[TestCase(ResultCompletionMode.Concurrent, 1)]
[TestCase(ResultCompletionMode.ConcurrentIfContinuation, 1)]
......@@ -473,6 +478,7 @@ public void MassiveBulkOpsSyncOldStyle(ResultCompletionMode completionMode, int
completionMode, threads, (workPerThread * threads) / timeTaken.TotalSeconds);
}
}
#endif
[Test]
[TestCase(true, 1)]
......
......@@ -17,7 +17,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>TRACE;DEBUG;FEATURE_BOOKSLEEVE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
......@@ -26,14 +26,14 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;FEATURE_BOOKSLEEVE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Verbose|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Verbose\</OutputPath>
<DefineConstants>TRACE;DEBUG;VERBOSE</DefineConstants>
<DefineConstants>TRACE;DEBUG;FEATURE_BOOKSLEEVE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
......@@ -43,7 +43,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Log Output|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Log Output\</OutputPath>
<DefineConstants>TRACE;DEBUG;LOGOUTPUT</DefineConstants>
<DefineConstants>TRACE;DEBUG;FEATURE_BOOKSLEEVE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
......@@ -51,7 +51,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono|AnyCPU'">
<OutputPath>bin\Mono\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;FEATURE_BOOKSLEEVE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
......
......@@ -8,7 +8,9 @@
using System.Text;
using System.Threading;
using System.Threading.Tasks;
#if FEATURE_BOOKSLEEVE
using BookSleeve;
#endif
using NUnit.Framework;
namespace StackExchange.Redis.Tests
......@@ -221,6 +223,7 @@ protected static string Me([CallerMemberName] string caller = null)
return caller;
}
#if FEATURE_BOOKSLEEVE
protected static RedisConnection GetOldStyleConnection(bool open = true, bool allowAdmin = false, bool waitForOpen = false, int syncTimeout = 5000, int ioTimeout = 5000)
{
return GetOldStyleConnection(PrimaryServer, PrimaryPort, open, allowAdmin, waitForOpen, syncTimeout, ioTimeout);
......@@ -239,7 +242,7 @@ private static RedisConnection GetOldStyleConnection(string host, int port, bool
}
return conn;
}
#endif
protected static TimeSpan RunConcurrent(Action work, int threads, int timeout = 10000, [CallerMemberName] string caller = null)
{
if (work == null) throw new ArgumentNullException("work");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment