diff --git a/lib/cpp/test/TServerIntegrationTest.cpp b/lib/cpp/test/TServerIntegrationTest.cpp
index 73bcdba..fec1b9c 100644
--- a/lib/cpp/test/TServerIntegrationTest.cpp
+++ b/lib/cpp/test/TServerIntegrationTest.cpp
@@ -22,6 +22,7 @@
 #include <boost/bind.hpp>
 #include <boost/foreach.hpp>
 #include <boost/format.hpp>
+#include <boost/make_shared.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/thread.hpp>
 #include <thrift/server/TSimpleServer.h>
@@ -56,7 +57,12 @@
 using apache::thrift::server::TThreadedServer;
 using apache::thrift::test::ParentServiceClient;
 using apache::thrift::test::ParentServiceIf;
+using apache::thrift::test::ParentServiceIfFactory;
+using apache::thrift::test::ParentServiceIfSingletonFactory;
 using apache::thrift::test::ParentServiceProcessor;
+using apache::thrift::test::ParentServiceProcessorFactory;
+using apache::thrift::TProcessor;
+using apache::thrift::TProcessorFactory;
 using boost::posix_time::milliseconds;
 
 /**
@@ -117,15 +123,19 @@
   }
 
   void getDataWait(std::string& _return, int32_t length) {
+    THRIFT_UNUSED_VARIABLE(_return);
+    THRIFT_UNUSED_VARIABLE(length);
   }
 
   void onewayWait() {
   }
 
   void exceptionWait(const std::string& message) {
+    THRIFT_UNUSED_VARIABLE(message);
   }
 
   void unexpectedExceptionWait(const std::string& message) {
+    THRIFT_UNUSED_VARIABLE(message);
   }
 
 protected:
@@ -143,10 +153,9 @@
 class TServerIntegrationTestFixture : public TestPortFixture
 {
 public:
-  TServerIntegrationTestFixture() :
+  TServerIntegrationTestFixture(const boost::shared_ptr<TProcessorFactory>& _processorFactory) :
       pServer(new TServerType(
-                    boost::shared_ptr<ParentServiceProcessor>(new ParentServiceProcessor(
-                            boost::shared_ptr<ParentServiceIf>(new ParentHandler))),
+                    _processorFactory,
                     boost::shared_ptr<TServerTransport>(new TServerSocket("localhost", m_serverPort)),
                     boost::shared_ptr<TTransportFactory>(new TTransportFactory),
                     boost::shared_ptr<TProtocolFactory>(new TBinaryProtocolFactory))),
@@ -155,6 +164,17 @@
     pServer->setServerEventHandler(pEventHandler);
   }
 
+  TServerIntegrationTestFixture(const boost::shared_ptr<TProcessor>& _processor) :
+      pServer(new TServerType(
+                    _processor,
+                    boost::shared_ptr<TServerTransport>(new TServerSocket("localhost", 0)),
+                    boost::shared_ptr<TTransportFactory>(new TTransportFactory),
+                    boost::shared_ptr<TProtocolFactory>(new TBinaryProtocolFactory))),
+      pEventHandler(boost::shared_ptr<TServerReadyEventHandler>(new TServerReadyEventHandler))
+  {
+    pServer->setServerEventHandler(pEventHandler);
+  }
+
   void startServer() {
     pServerThread.reset(new boost::thread(boost::bind(&TServerType::serve, pServer.get())));
 
@@ -191,6 +211,11 @@
     stopServer();
   }
 
+  int getServerPort() {
+    TServerSocket *pSock = dynamic_cast<TServerSocket *>(pServer->getServerTransport().get());
+    return pSock->getPort();
+  }
+
   void delayClose(boost::shared_ptr<TTransport> toClose, boost::posix_time::time_duration after) {
     boost::this_thread::sleep(after);
     toClose->close();
@@ -202,7 +227,7 @@
     std::vector<boost::shared_ptr<boost::thread> > holdThreads;
 
     for (int64_t i = 0; i < numToMake; ++i) {
-        boost::shared_ptr<TSocket> pClientSock(new TSocket("localhost", m_serverPort), autoSocketCloser);
+        boost::shared_ptr<TSocket> pClientSock(new TSocket("localhost", getServerPort()), autoSocketCloser);
         holdSockets.push_back(pClientSock);
         boost::shared_ptr<TProtocol> pClientProtocol(new TBinaryProtocol(pClientSock));
         ParentServiceClient client(pClientProtocol);
@@ -229,25 +254,56 @@
   boost::shared_ptr<boost::thread> pServerThread;
 };
 
-BOOST_FIXTURE_TEST_SUITE( Baseline, TestPortFixture )
+template<class TServerType>
+class TServerIntegrationProcessorFactoryTestFixture : public TServerIntegrationTestFixture<TServerType>
+{
+public:
+    TServerIntegrationProcessorFactoryTestFixture() :
+        TServerIntegrationTestFixture<TServerType>(
+                boost::make_shared<ParentServiceProcessorFactory>(
+                    boost::make_shared<ParentServiceIfSingletonFactory>(
+                            boost::make_shared<ParentHandler>()))) { }
+};
 
-BOOST_FIXTURE_TEST_CASE(test_simple, TServerIntegrationTestFixture<TSimpleServer>)
+template<class TServerType>
+class TServerIntegrationProcessorTestFixture : public TServerIntegrationTestFixture<TServerType>
+{
+public:
+    TServerIntegrationProcessorTestFixture() :
+        TServerIntegrationTestFixture<TServerType>(
+                boost::make_shared<ParentServiceProcessor>(
+                        boost::make_shared<ParentHandler>())) { }
+};
+
+BOOST_AUTO_TEST_SUITE(constructors)
+
+BOOST_FIXTURE_TEST_CASE(test_simple_factory, TServerIntegrationProcessorFactoryTestFixture<TSimpleServer>)
 {
     baseline(3, 1);
 }
 
-BOOST_FIXTURE_TEST_CASE(test_threaded, TServerIntegrationTestFixture<TThreadedServer>)
+BOOST_FIXTURE_TEST_CASE(test_simple, TServerIntegrationProcessorTestFixture<TSimpleServer>)
+{
+    baseline(3, 1);
+}
+
+BOOST_FIXTURE_TEST_CASE(test_threaded_factory, TServerIntegrationProcessorFactoryTestFixture<TThreadedServer>)
 {
     baseline(10, 10);
 }
 
-BOOST_FIXTURE_TEST_CASE(test_threaded_bound, TServerIntegrationTestFixture<TThreadedServer>)
+BOOST_FIXTURE_TEST_CASE(test_threaded, TServerIntegrationProcessorTestFixture<TThreadedServer>)
+{
+    baseline(10, 10);
+}
+
+BOOST_FIXTURE_TEST_CASE(test_threaded_bound, TServerIntegrationProcessorTestFixture<TThreadedServer>)
 {
     pServer->setConcurrentClientLimit(4);
     baseline(10, 4);
 }
 
-BOOST_FIXTURE_TEST_CASE(test_threadpool, TServerIntegrationTestFixture<TThreadPoolServer>)
+BOOST_FIXTURE_TEST_CASE(test_threadpool_factory, TServerIntegrationProcessorFactoryTestFixture<TThreadPoolServer>)
 {
     pServer->getThreadManager()->threadFactory(
             boost::shared_ptr<apache::thrift::concurrency::ThreadFactory>(
@@ -262,7 +318,22 @@
     baseline(10, 5);
 }
 
-BOOST_FIXTURE_TEST_CASE(test_threadpool_bound, TServerIntegrationTestFixture<TThreadPoolServer>)
+BOOST_FIXTURE_TEST_CASE(test_threadpool, TServerIntegrationProcessorTestFixture<TThreadPoolServer>)
+{
+    pServer->getThreadManager()->threadFactory(
+            boost::shared_ptr<apache::thrift::concurrency::ThreadFactory>(
+                    new apache::thrift::concurrency::PlatformThreadFactory));
+    pServer->getThreadManager()->start();
+
+    // thread factory has 4 threads as a default
+    // thread factory however is a bad way to limit concurrent clients
+    // as accept() will be called to grab a 5th client socket, in this case
+    // and then the thread factory will block adding the thread to manage
+    // that client.
+    baseline(10, 5);
+}
+
+BOOST_FIXTURE_TEST_CASE(test_threadpool_bound, TServerIntegrationProcessorTestFixture<TThreadPoolServer>)
 {
     pServer->getThreadManager()->threadFactory(
             boost::shared_ptr<apache::thrift::concurrency::ThreadFactory>(
@@ -276,7 +347,7 @@
 BOOST_AUTO_TEST_SUITE_END()
 
 
-BOOST_FIXTURE_TEST_SUITE ( TServerIntegrationTest, TServerIntegrationTestFixture<TThreadedServer> )
+BOOST_FIXTURE_TEST_SUITE ( TServerIntegrationTest, TServerIntegrationProcessorTestFixture<TThreadedServer> )
 
 BOOST_AUTO_TEST_CASE(test_stop_with_interruptable_clients_connected)
 {
@@ -284,10 +355,10 @@
 
     startServer();
 
-    boost::shared_ptr<TSocket> pClientSock1(new TSocket("localhost", m_serverPort), autoSocketCloser);
+    boost::shared_ptr<TSocket> pClientSock1(new TSocket("localhost", getServerPort()), autoSocketCloser);
     pClientSock1->open();
 
-    boost::shared_ptr<TSocket> pClientSock2(new TSocket("localhost", m_serverPort), autoSocketCloser);
+    boost::shared_ptr<TSocket> pClientSock2(new TSocket("localhost", getServerPort()), autoSocketCloser);
     pClientSock2->open();
 
     // Ensure they have been accepted
@@ -313,10 +384,10 @@
 
     startServer();
 
-    boost::shared_ptr<TSocket> pClientSock1(new TSocket("localhost", m_serverPort), autoSocketCloser);
+    boost::shared_ptr<TSocket> pClientSock1(new TSocket("localhost", getServerPort()), autoSocketCloser);
     pClientSock1->open();
 
-    boost::shared_ptr<TSocket> pClientSock2(new TSocket("localhost", m_serverPort), autoSocketCloser);
+    boost::shared_ptr<TSocket> pClientSock2(new TSocket("localhost", getServerPort()), autoSocketCloser);
     pClientSock2->open();
 
     // Ensure they have been accepted
@@ -340,19 +411,19 @@
     BOOST_CHECK_EQUAL(0, pServer->getConcurrentClientCount());
     BOOST_CHECK_EQUAL(2, pServer->getConcurrentClientLimit());
 
-    boost::shared_ptr<TSocket> pClientSock1(new TSocket("localhost", m_serverPort), autoSocketCloser);
+    boost::shared_ptr<TSocket> pClientSock1(new TSocket("localhost", getServerPort()), autoSocketCloser);
     pClientSock1->open();
     blockUntilAccepted(1);
     BOOST_CHECK_EQUAL(1, pServer->getConcurrentClientCount());
 
-    boost::shared_ptr<TSocket> pClientSock2(new TSocket("localhost", m_serverPort), autoSocketCloser);
+    boost::shared_ptr<TSocket> pClientSock2(new TSocket("localhost", getServerPort()), autoSocketCloser);
     pClientSock2->open();
     blockUntilAccepted(2);
     BOOST_CHECK_EQUAL(2, pServer->getConcurrentClientCount());
 
     // a third client cannot connect until one of the other two closes
     boost::thread t2(boost::bind(&TServerIntegrationTestFixture::delayClose, this, pClientSock2, milliseconds(250)));
-    boost::shared_ptr<TSocket> pClientSock3(new TSocket("localhost", m_serverPort), autoSocketCloser);
+    boost::shared_ptr<TSocket> pClientSock3(new TSocket("localhost", getServerPort()), autoSocketCloser);
     pClientSock2->open();
     blockUntilAccepted(2);
     BOOST_CHECK_EQUAL(2, pServer->getConcurrentClientCount());
