Some thrift test code improvements


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665050 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/threads/ThreadsClient.cpp b/test/threads/ThreadsClient.cpp
index d8f6766..7ad6f00 100644
--- a/test/threads/ThreadsClient.cpp
+++ b/test/threads/ThreadsClient.cpp
@@ -10,6 +10,7 @@
 #include <thrift/concurrency/ThreadManager.h>
 #include <thrift/concurrency/PosixThreadFactory.h>
 
+using boost::shared_ptr;
 using namespace facebook::thrift;
 using namespace facebook::thrift::protocol;
 using namespace facebook::thrift::transport;
diff --git a/test/threads/ThreadsServer.cpp b/test/threads/ThreadsServer.cpp
index f5bd665..7d17eca 100644
--- a/test/threads/ThreadsServer.cpp
+++ b/test/threads/ThreadsServer.cpp
@@ -4,12 +4,14 @@
 #include "ThreadsTest.h"
 #include <protocol/TBinaryProtocol.h>
 #include <server/TThreadPoolServer.h>
+#include <server/TThreadedServer.h>
 #include <transport/TServerSocket.h>
 #include <transport/TTransportUtils.h>
 #include <thrift/concurrency/Monitor.h>
 #include <thrift/concurrency/ThreadManager.h>
 #include <thrift/concurrency/PosixThreadFactory.h>
 
+using boost::shared_ptr;
 using namespace facebook::thrift;
 using namespace facebook::thrift::protocol;
 using namespace facebook::thrift::transport;
@@ -84,23 +86,31 @@
   shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
   shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
 
+  /*
   shared_ptr<ThreadManager> threadManager = 
     ThreadManager::newSimpleThreadManager(10);
   shared_ptr<PosixThreadFactory> threadFactory =
     shared_ptr<PosixThreadFactory>(new PosixThreadFactory());
   threadManager->threadFactory(threadFactory);
   threadManager->start();
-  
-  shared_ptr<TServer> threadPoolServer =
+ 
+  shared_ptr<TServer> server =
     shared_ptr<TServer>(new TThreadPoolServer(processor,
                                               serverTransport,
                                               transportFactory,
                                               protocolFactory,
                                               threadManager));
+  */
 
-  handler->setServer(threadPoolServer);
+  shared_ptr<TServer> server =
+    shared_ptr<TServer>(new TThreadedServer(processor,
+                                            serverTransport,
+                                            transportFactory,
+                                            protocolFactory));
 
-  threadPoolServer->serve();
+  handler->setServer(server);
+
+  server->serve();
 
   fprintf(stderr, "done.\n");