[
https://issues.apache.org/jira/browse/THRIFT-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15992925#comment-15992925
]
ASF GitHub Bot commented on THRIFT-4186:
----------------------------------------
Github user jeking3 commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1260#discussion_r114321962
--- Diff: test/rs/src/bin/test_server.rs ---
@@ -104,35 +104,43 @@ fn run() -> thrift::Result<()> {
}
};
- let processor = ThriftTestSyncProcessor::new(ThriftTestSyncHandlerImpl
{});
+ let test_processor =
ThriftTestSyncProcessor::new(ThriftTestSyncHandlerImpl {});
- let mut server = match &*server_type {
- "simple" => {
- TServer::new(
+ match &*server_type {
+ "simple" | "thread-pool" => {
+ let mut server = TServer::new(
i_transport_factory,
i_protocol_factory,
o_transport_factory,
o_protocol_factory,
- processor,
+ test_processor,
1,
- )
+ );
+
+ server.listen(&listen_address)
}
- "thread-pool" => {
- TServer::new(
+ t if t.to_owned().starts_with("multi") => {
+ let second_service_processor =
SecondServiceSyncProcessor::new(SecondServiceSyncHandlerImpl {},);
+
+ let mut multiplexed_processor = TMultiplexedProcessor::new();
+ multiplexed_processor.register("ThriftTest",
Box::new(test_processor));
+ multiplexed_processor.register("SecondService",
Box::new(second_service_processor));
--- End diff --
So nice to see more language support for cross test like this!
> Build and test rust client in Travis
> ------------------------------------
>
> Key: THRIFT-4186
> URL: https://issues.apache.org/jira/browse/THRIFT-4186
> Project: Thrift
> Issue Type: Task
> Reporter: Allen George
> Assignee: Allen George
>
> Right now the rust client/server is not being tested in travis. We should
> build it in ubuntu, run the cross-tests as well as the library tests, and
> also incorporate multiplexed tests if possible.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)