THRIFT-2013: add multiplex server and client test support to cpp language
add multiplex client test support to csharp and java languages
fix a bug in the server-side header protocol factory
fix a bug in the cpp SSL server socket implementation
remove unnecessary sleep in cpp server testOneway
This closes #1414
diff --git a/lib/csharp/test/ThriftMVCTest/Controllers/HomeController.cs b/lib/csharp/test/ThriftMVCTest/Controllers/HomeController.cs
index ab9eada..c9a1ec4 100644
--- a/lib/csharp/test/ThriftMVCTest/Controllers/HomeController.cs
+++ b/lib/csharp/test/ThriftMVCTest/Controllers/HomeController.cs
@@ -41,9 +41,8 @@
SecondService.IAsync asyncService =
new SecondService.Client(new TBinaryProtocol(new THttpClient(new Uri(baseUri, "Async.thrift"))));
- await asyncService.blahBlahAsync();
var result = await asyncService.secondtestStringAsync("TestString");
- if (result != "TestString")
+ if (result != "testString(\"TestString\")")
{
throw new Exception("The wrong result was returned");
}
@@ -59,9 +58,8 @@
SecondService.ISync service =
new SecondService.Client(new TBinaryProtocol(new THttpClient(new Uri(baseUri, "Sync.thrift"))));
- service.blahBlah();
var result = service.secondtestString("TestString");
- if (result != "TestString")
+ if (result != "testString(\"TestString\")")
{
throw new Exception("The wrong result was returned");
}
@@ -69,4 +67,4 @@
return RedirectToAction("Index");
}
}
-}
\ No newline at end of file
+}
diff --git a/lib/csharp/test/ThriftMVCTest/SecondServiceImpl.cs b/lib/csharp/test/ThriftMVCTest/SecondServiceImpl.cs
index dce0148..fad301a 100644
--- a/lib/csharp/test/ThriftMVCTest/SecondServiceImpl.cs
+++ b/lib/csharp/test/ThriftMVCTest/SecondServiceImpl.cs
@@ -24,24 +24,14 @@
{
public class SecondServiceImpl : SecondService.IAsync, SecondService.ISync
{
- public Task blahBlahAsync()
- {
- return Task.FromResult(0);
- }
-
public Task<string> secondtestStringAsync(string thing)
{
return Task.FromResult(thing);
}
- public void blahBlah()
- {
-
- }
-
public string secondtestString(string thing)
{
- return thing;
+ return "testString(\"" + thing + "\")";
}
}
-}
\ No newline at end of file
+}