Bring Thrift test code up to date
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664852 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/py/TestClient.py b/test/py/TestClient.py
index a2fa3c7..3e48733 100755
--- a/test/py/TestClient.py
+++ b/test/py/TestClient.py
@@ -48,8 +48,8 @@
else:
transport = TTransport.TBufferedTransport(socket)
-protocol = TBinaryProtocol.TBinaryProtocol()
-client = ThriftTest.Client(transport, protocol)
+protocol = TBinaryProtocol.TBinaryProtocol(transport)
+client = ThriftTest.Client(protocol)
# Connect!
transport.open()
diff --git a/test/py/TestServer.py b/test/py/TestServer.py
index 96312c5..e3f76f8 100755
--- a/test/py/TestServer.py
+++ b/test/py/TestServer.py
@@ -51,10 +51,10 @@
x.message = str
raise x
-transport = TSocket.TServerSocket(9090)
-protocol = TBinaryProtocol.TBinaryProtocol()
handler = TestHandler()
-processor = ThriftTest.Processor(handler, protocol)
-factory = TTransport.TBufferedTransportFactory()
-server = TServer.TSimpleServer(processor, transport, factory)
+processor = ThriftTest.Processor(handler)
+transport = TSocket.TServerSocket(9090)
+tfactory = TTransport.TBufferedTransportFactory()
+pfactory = TBinaryProtocol.TBinaryProtocolFactory()
+server = TServer.TThreadedServer(processor, transport, tfactory, pfactory)
server.serve()