Commit 76b38ff7 authored by pmartynov's avatar pmartynov

Test case for issue #182

parent dbec9ca5
using System;
using System.Linq;
using NUnit.Framework;
namespace StackExchange.Redis.Tests.Issues
{
[TestFixture]
public class Issue182 : TestBase
{
[Test]
public void SetMembers()
{
using (var conn = Create())
{
var db = conn.GetDatabase();
var key = Me();
const int count = (int)5e6;
db.KeyDeleteAsync(key).Wait();
foreach (var _ in Enumerable.Range(0, count))
db.SetAdd(key, Guid.NewGuid().ToByteArray(), CommandFlags.FireAndForget);
Assert.AreEqual(count, db.SetLengthAsync(key).Result, "SCARD for set");
var task = db.SetMembersAsync(key);
task.Wait();
Assert.AreEqual(count, task.Result.Length, "SMEMBERS result length");
}
}
}
}
\ No newline at end of file
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
<Compile Include="ConnectingFailDetection.cs" /> <Compile Include="ConnectingFailDetection.cs" />
<Compile Include="ConnectToUnexistingHost.cs" /> <Compile Include="ConnectToUnexistingHost.cs" />
<Compile Include="HyperLogLog.cs" /> <Compile Include="HyperLogLog.cs" />
<Compile Include="Issues\Issue182.cs" />
<Compile Include="WrapperBaseTests.cs" /> <Compile Include="WrapperBaseTests.cs" />
<Compile Include="TransactionWrapperTests.cs" /> <Compile Include="TransactionWrapperTests.cs" />
<Compile Include="Bits.cs" /> <Compile Include="Bits.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