Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
80b3a574
Commit
80b3a574
authored
Apr 09, 2015
by
pmartynov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another testcase for issue #182
parent
76b38ff7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
Issue182.cs
StackExchange.Redis.Tests/Issues/Issue182.cs
+30
-0
No files found.
StackExchange.Redis.Tests/Issues/Issue182.cs
View file @
80b3a574
...
...
@@ -28,5 +28,35 @@ public void SetMembers()
Assert
.
AreEqual
(
count
,
task
.
Result
.
Length
,
"SMEMBERS result length"
);
}
}
[
Test
]
public
void
SetUnion
()
{
using
(
var
conn
=
Create
())
{
var
db
=
conn
.
GetDatabase
();
var
key1
=
Me
()
+
":1"
;
var
key2
=
Me
()
+
":2"
;
var
dstkey
=
Me
()
+
":dst"
;
db
.
KeyDeleteAsync
(
key1
).
Wait
();
db
.
KeyDeleteAsync
(
key2
).
Wait
();
db
.
KeyDeleteAsync
(
dstkey
).
Wait
();
const
int
count
=
(
int
)
5
e6
;
foreach
(
var
_
in
Enumerable
.
Range
(
0
,
count
))
{
db
.
SetAdd
(
key1
,
Guid
.
NewGuid
().
ToByteArray
(),
CommandFlags
.
FireAndForget
);
db
.
SetAdd
(
key2
,
Guid
.
NewGuid
().
ToByteArray
(),
CommandFlags
.
FireAndForget
);
}
Assert
.
AreEqual
(
count
,
db
.
SetLengthAsync
(
key1
).
Result
,
"SCARD for set 1"
);
Assert
.
AreEqual
(
count
,
db
.
SetLengthAsync
(
key2
).
Result
,
"SCARD for set 2"
);
db
.
SetCombineAndStoreAsync
(
SetOperation
.
Union
,
dstkey
,
key1
,
key2
).
Wait
();
var
dstLen
=
db
.
SetLength
(
dstkey
);
Assert
.
AreEqual
(
count
*
2
,
dstLen
,
"SCARD for destination set"
);
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment