Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
eos
QuarkDB
Commits
463dba80
Commit
463dba80
authored
Dec 19, 2017
by
Georgios Bitzes
Browse files
Add QSet::sscan test
parent
011dd118
Pipeline
#269701
passed with stages
in 25 minutes and 7 seconds
Changes
2
Pipelines
5
Hide whitespace changes
Inline
Side-by-side
qclient
@
40feec72
Compare
2559fcbd
...
40feec72
Subproject commit
2559fcbdf7a1745043794e6e06c83619a7ea6cd8
Subproject commit
40feec72c5885042b65b047407e5fab91bbe9ee3
test/e2e.cc
View file @
463dba80
...
...
@@ -35,6 +35,7 @@
#include <gtest/gtest.h>
#include "test-reply-macros.hh"
#include "qclient/QScanner.hh"
#include "qclient/QSet.hh"
#include "qclient/ConnectionInitiator.hh"
using
namespace
quarkdb
;
...
...
@@ -751,4 +752,16 @@ TEST_F(Raft_e2e, sscan) {
reply
=
tunnel
(
leaderID
)
->
exec
(
"sscan"
,
"not-existing"
,
"next:zz"
).
get
();
ASSERT_REPLY
(
reply
,
std
::
make_pair
(
"0"
,
make_vec
()));
QSet
qset
(
*
tunnel
(
leaderID
),
"myset"
);
auto
pair
=
qset
.
sscan
(
"0"
,
2
);
ASSERT_EQ
(
pair
.
first
,
"next:c"
);
ASSERT_EQ
(
pair
.
second
,
make_vec
(
"a"
,
"b"
));
QSet
qset2
(
*
tunnel
(
leaderID
),
"not-existing"
);
pair
=
qset2
.
sscan
(
"0"
,
2
);
ASSERT_EQ
(
pair
.
first
,
"0"
);
ASSERT_EQ
(
pair
.
second
,
make_vec
());
}
Write
Preview
Supports
Markdown
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