THRIFT-67. python: Add TNonblockingServer
This TNonblockingServer is very similar to the C++ implementation.
It assumes the framed transport, but it uses select instead of libevent.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@712306 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/py/RunClientServer.py b/test/py/RunClientServer.py
index cbff372..48eadb6 100755
--- a/test/py/RunClientServer.py
+++ b/test/py/RunClientServer.py
@@ -9,12 +9,16 @@
def relfile(fname):
return os.path.join(os.path.dirname(__file__), fname)
+FRAMED = ["TNonblockingServer"]
+
def runTest(server_class):
print "Testing ", server_class
serverproc = subprocess.Popen([sys.executable, relfile("TestServer.py"), server_class])
try:
-
- ret = subprocess.call([sys.executable, relfile("TestClient.py")])
+ argv = [sys.executable, relfile("TestClient.py")]
+ if server_class in FRAMED:
+ argv.append('--framed')
+ ret = subprocess.call(argv)
if ret != 0:
raise Exception("subprocess failed")
finally:
@@ -25,4 +29,4 @@
time.sleep(5)
map(runTest, ["TForkingServer", "TThreadPoolServer",
- "TThreadedServer", "TSimpleServer"])
+ "TThreadedServer", "TSimpleServer", "TNonblockingServer"])