Commit 588c921f authored by Marc Gravell's avatar Marc Gravell

SO22786599

parent 9c2a20d7
using System.Diagnostics;
using System.Linq;
using NUnit.Framework;
namespace StackExchange.Redis.Tests.Issues
{
[TestFixture]
public class SO22786599 : TestBase
{
[Test]
public void Execute()
{
string CurrentIdsSetDbKey = Me() + ".x";
string CurrentDetailsSetDbKey = Me() + ".y";
RedisValue[] stringIds = Enumerable.Range(1, 750).Select(i => (RedisValue)(i + " id")).ToArray();
RedisValue[] stringDetails = Enumerable.Range(1, 750).Select(i => (RedisValue)(i + " detail")).ToArray();
using (var conn = Create())
{
var db = conn.GetDatabase();
var tran = db.CreateTransaction();
tran.SetAddAsync(CurrentIdsSetDbKey, stringIds);
tran.SetAddAsync(CurrentDetailsSetDbKey, stringDetails);
var watch = Stopwatch.StartNew();
var isOperationSuccessful = tran.Execute();
watch.Stop();
System.Console.WriteLine("{0}ms", watch.ElapsedMilliseconds);
Assert.IsTrue(isOperationSuccessful);
}
}
}
}
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
<Compile Include="Config.cs" /> <Compile Include="Config.cs" />
<Compile Include="FloatingPoint.cs" /> <Compile Include="FloatingPoint.cs" />
<Compile Include="Issues\Issue6.cs" /> <Compile Include="Issues\Issue6.cs" />
<Compile Include="Issues\SO22786599.cs" />
<Compile Include="Keys.cs" /> <Compile Include="Keys.cs" />
<Compile Include="KeysAndValues.cs" /> <Compile Include="KeysAndValues.cs" />
<Compile Include="Lists.cs" /> <Compile Include="Lists.cs" />
......
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