diff options
author | James E. King, III <jking@apache.org> | 2017-11-18 22:37:54 -0500 |
---|---|---|
committer | James E. King, III <jking@apache.org> | 2017-11-21 14:20:26 -0500 |
commit | 20e16bc6a41c6faead040aed7f3c00b9d2e7f842 (patch) | |
tree | f8abb950b1ad7ef652840298523b8ec9baa6ce4f /test/rs | |
parent | cde4d4181a252323d87e7ac086ce495cd1227c5c (diff) | |
download | thrift-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.rs | 4 | ||||
-rw-r--r-- | test/rs/src/bin/test_server.rs | 2 |
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) } |