THRIFT-2013: add perl crosstest multiplexed client and server logic
Client: perl
This closes #1416
diff --git a/test/rs/src/bin/test_client.rs b/test/rs/src/bin/test_client.rs
index 0df2f00..297faf9 100644
--- a/test/rs/src/bin/test_client.rs
+++ b/test/rs/src/bin/test_client.rs
@@ -588,11 +588,15 @@
actual: Result<T, thrift::Error>,
expected: T,
) -> Result<(), thrift::Error> {
+ info!("*** EXPECTED: Ok({:?})", expected);
+ info!("*** ACTUAL : {:?}", actual);
match actual {
Ok(v) => {
if v == expected {
+ info!("*** OK ***");
Ok(())
} else {
+ info!("*** FAILED ***");
Err(thrift::Error::User(format!("expected {:?} but got {:?}", &expected, &v).into()),)
}
}
diff --git a/test/rs/src/bin/test_server.rs b/test/rs/src/bin/test_server.rs
index 81a2ad8..1976bf4 100644
--- a/test/rs/src/bin/test_server.rs
+++ b/test/rs/src/bin/test_server.rs
@@ -391,7 +391,7 @@
struct SecondServiceSyncHandlerImpl;
impl SecondServiceSyncHandler for SecondServiceSyncHandlerImpl {
fn handle_secondtest_string(&self, thing: String) -> thrift::Result<String> {
- info!("testString({})", &thing);
+ info!("(second)testString({})", &thing);
let ret = format!("testString(\"{}\")", &thing);
Ok(ret)
}