Commit 463dba80 authored by Georgios Bitzes's avatar Georgios Bitzes
Browse files

Add QSet::sscan test

parent 011dd118
Pipeline #269701 passed with stages
in 25 minutes and 7 seconds
Subproject commit 2559fcbdf7a1745043794e6e06c83619a7ea6cd8
Subproject commit 40feec72c5885042b65b047407e5fab91bbe9ee3
......@@ -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());
Supports Markdown
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