client Add NTURI version of rpc()

and consolidate with similar code for building
pvRequest _options and put() builder.
This commit is contained in:
Michael Davidsaver
2020-03-12 19:49:31 -07:00
parent 6117de2991
commit ad609e420c
6 changed files with 262 additions and 114 deletions
+21 -1
View File
@@ -168,19 +168,39 @@ struct Tester {
testSkip(1, "timeout");
}
}
void builder()
{
mbox.open(initial);
serv.start();
auto op = cli.rpc("mailbox")
.arg("a", 5)
.arg("b", "hello")
.exec();
cli.hurryUp();
auto result = op->wait();
testEq(result["query.a"].as<int32_t>(), 5);
testEq(result["query.b"].as<std::string>(), "hello");
}
};
} // namespace
MAIN(testrpc)
{
testPlan(14);
testPlan(16);
Tester().echo();
Tester().lazy();
Tester().null();
Tester().timeout();
Tester().cancel();
Tester().error();
Tester().builder();
cleanup_for_valgrind();
return testDone();
}