summaryrefslogtreecommitdiff
path: root/test/rs
diff options
context:
space:
mode:
authorJames E. King, III <jking@apache.org>2017-11-18 22:37:54 -0500
committerJames E. King, III <jking@apache.org>2017-11-21 14:20:26 -0500
commit20e16bc6a41c6faead040aed7f3c00b9d2e7f842 (patch)
treef8abb950b1ad7ef652840298523b8ec9baa6ce4f /test/rs
parentcde4d4181a252323d87e7ac086ce495cd1227c5c (diff)
downloadthrift-20e16bc6a41c6faead040aed7f3c00b9d2e7f842.tar.gz
THRIFT-2013: add perl crosstest multiplexed client and server logic
Client: perl This closes #1416
Diffstat (limited to 'test/rs')
-rw-r--r--test/rs/src/bin/test_client.rs4
-rw-r--r--test/rs/src/bin/test_server.rs2
2 files changed, 5 insertions, 1 deletions
diff --git a/test/rs/src/bin/test_client.rs b/test/rs/src/bin/test_client.rs
index 0df2f009f..297faf918 100644
--- a/test/rs/src/bin/test_client.rs
+++ b/test/rs/src/bin/test_client.rs
@@ -588,11 +588,15 @@ fn verify_expected_result<T: Debug + PartialEq + Sized>(
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 81a2ad81d..1976bf4ab 100644
--- a/test/rs/src/bin/test_server.rs
+++ b/test/rs/src/bin/test_server.rs
@@ -391,7 +391,7 @@ impl ThriftTestSyncHandler for ThriftTestSyncHandlerImpl {
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)
}