using Catch::Matchers::Contains;
TEST_CASE("bin/memaslap") {
- Shell sh{string{TESTING_ROOT "/../src/bin"}};
+ Shell sh{string{TESTING_ROOT "/../contrib/bin/memaslap"}};
SECTION("no servers provided") {
string output;
SECTION("with servers") {
auto test = MemcachedCluster::network();
auto examples = {
- " -t 2s -S 1s",
- " -t 2s -v 0.2 -e 0.05 -b",
- " -t 2s -w 40k -S 20s -o 0.2",
- " -t 2s -T 4 -c 128 -d 20 -P 40k",
- " -t 2s -d 50 -a -n 10",
+ " -T 2 -c 8 -t 2s -S 1s",
+ " -T 2 -c 8 -t 2s -v 0.2 -e 0.05 -b",
+ " -T 2 -c 8 -t 2s -w 40k -o 0.2",
+ " -T 2 -c 8 -t 2s -d 20 -P 40k",
+#if 0
+ " -T 2 -c 8 -t 2s -d 50 -a -n 10",
+#endif
};
string servers{"-s "};
for (const auto args : examples) {
string output;
INFO(args);
- REQUIRE(sh.run("memaslap " + servers + args, output));
+ auto ok = sh.run("memaslap -b " + servers + args, output);
+ INFO(output);
+ REQUIRE(ok);
REQUIRE_THAT(output, Contains("TPS"));
}
}