diff options
author | Arne H Juul <arnej@yahooinc.com> | 2021-10-14 10:11:20 +0000 |
---|---|---|
committer | Arne H Juul <arnej@yahooinc.com> | 2021-10-14 10:11:20 +0000 |
commit | df689ff589e185f51dec5a6cfa70e4009ebc176a (patch) | |
tree | b1c55046f2a32f088e2215f4712da41597c473ef /searchlib/src/tests/engine/proto_rpc_adapter/proto_rpc_adapter_test.cpp | |
parent | adad7cc066e7debe8137737a8ce9c6ce377a2c1a (diff) |
make DocsumReply a proper class
Diffstat (limited to 'searchlib/src/tests/engine/proto_rpc_adapter/proto_rpc_adapter_test.cpp')
-rw-r--r-- | searchlib/src/tests/engine/proto_rpc_adapter/proto_rpc_adapter_test.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/searchlib/src/tests/engine/proto_rpc_adapter/proto_rpc_adapter_test.cpp b/searchlib/src/tests/engine/proto_rpc_adapter/proto_rpc_adapter_test.cpp index 41f471f0a7a..7aa72b50ba4 100644 --- a/searchlib/src/tests/engine/proto_rpc_adapter/proto_rpc_adapter_test.cpp +++ b/searchlib/src/tests/engine/proto_rpc_adapter/proto_rpc_adapter_test.cpp @@ -49,12 +49,11 @@ struct MyDocsumServer : DocsumServer { DocsumReply::UP getDocsums(DocsumRequest::Source src, DocsumClient &client) override { auto req = src.release(); assert(req); - auto reply = std::make_unique<DocsumReply>(); - reply->_root = std::make_unique<Slime>(); - auto &list = reply->_root->setArray(); + auto reply = std::make_unique<DocsumReply>(std::make_unique<Slime>()); + auto &list = reply->slime().setArray(); list.addObject().setBool("use_root_slime", true); list.addObject().setString("ranking", req->ranking); - reply->request = std::move(req); + reply->setRequest(std::move(req)); std::this_thread::sleep_for(std::chrono::milliseconds(5)); client.getDocsumsDone(std::move(reply)); // simplified async response return std::unique_ptr<DocsumReply>(); |