Conform cmake
This commit is contained in:
parent
7847a7f17a
commit
c1f9fb7a59
environment/toolchain
src
tests/unit
12
environment/toolchain/fbthrift.patch
Normal file
12
environment/toolchain/fbthrift.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -ur a/thrift/lib/cpp2/server/IOWorkerContext.h b/thrift/lib/cpp2/server/IOWorkerContext.h
|
||||
--- a/thrift/lib/cpp2/server/IOWorkerContext.h 2022-06-08 11:50:43.043948657 +0200
|
||||
+++ b/thrift/lib/cpp2/server/IOWorkerContext.h 2022-06-08 11:47:33.232695125 +0200
|
||||
@@ -59,7 +59,7 @@
|
||||
auto aliveLocked = alive->rlock();
|
||||
if (*aliveLocked) {
|
||||
// IOWorkerContext is still alive and so is replyQueue_
|
||||
- queue->startConsumingInternal(&evb);
|
||||
+ queue->startConsuming(&evb);
|
||||
}
|
||||
});
|
||||
}
|
@ -42,7 +42,7 @@ set(mg_single_node_v2_sources
|
||||
)
|
||||
|
||||
set(mg_single_node_v2_libs stdc++fs Threads::Threads
|
||||
telemetry_lib mg-query mg-communication mg-memory mg-utils mg-auth mg-license mg-settings, mg-interface-storage-cpp2)
|
||||
telemetry_lib mg-query mg-communication mg-memory mg-utils mg-auth mg-license mg-settings)
|
||||
if (MG_ENTERPRISE)
|
||||
# These are enterprise subsystems
|
||||
set(mg_single_node_v2_libs ${mg_single_node_v2_libs} mg-audit)
|
||||
|
@ -27,7 +27,7 @@ mg_thrift_library(
|
||||
)
|
||||
|
||||
mg_thrift_library(
|
||||
"echo_trial" #file_name
|
||||
"echo" #file_name
|
||||
"Echo" #services
|
||||
"${MG_INTERFACE_PATH}" #file_path
|
||||
"${MG_INTERFACE_PATH}" #output_path
|
||||
|
7
src/interface/echo.thrift
Normal file
7
src/interface/echo.thrift
Normal file
@ -0,0 +1,7 @@
|
||||
struct EchoMessage {
|
||||
1: binary message;
|
||||
}
|
||||
|
||||
service Echo {
|
||||
oneway void ReceiveSend(1: EchoMessage m)
|
||||
}
|
@ -397,4 +397,4 @@ target_link_libraries(${test_prefix}future mg-io)
|
||||
|
||||
# Test Thrift transport echo
|
||||
add_unit_test(thrift_transport_echo.cpp)
|
||||
target_link_libraries(${test_prefix}thrift_transport_echo mg-io)
|
||||
target_link_libraries(${test_prefix}thrift_transport_echo mg-io Threads::Threads mg-interface-echo-cpp2 fmt)
|
||||
|
@ -33,8 +33,6 @@ using namespace folly;
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
namespace {
|
||||
|
||||
// static constexpr int port = 6666; // The port on which server is listening
|
||||
|
||||
class EchoSvc : public EchoSvIf {
|
||||
@ -49,7 +47,7 @@ class EchoSvc : public EchoSvIf {
|
||||
// The Thrift handle method
|
||||
void ReceiveSend(const EchoMessage &m) override {
|
||||
// m.get_message();
|
||||
LOG(ERROR) << "Received\n";
|
||||
// LOG(ERROR) << "Received\n";
|
||||
current_message_ = prefix_ + m.get_message();
|
||||
// SendOutMessage(6665);
|
||||
// LOG(ERROR) << "Sent\n";
|
||||
@ -88,8 +86,6 @@ class EchoSvc : public EchoSvIf {
|
||||
std::string GetCurrentMessage() { return current_message_; }
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
TEST(ThriftTransport, Echo) {
|
||||
// TODO(tyler and gabor) use thrift-generated echo, and thrift transport, to send, reply, and receive the response for
|
||||
// a thrift-defined message
|
||||
|
Loading…
Reference in New Issue
Block a user