예제 #1
0
    def test_defaults(self):
        transport = mock.Mock()
        transport.conf = self.conf

        class MessageHandlingServerImpl(server.MessageHandlingServer):
            def _create_listener(self):
                pass

            def _process_incoming(self, incoming):
                pass

        MessageHandlingServerImpl(transport, mock.Mock())
        opts.set_defaults(self.conf, executor_thread_pool_size=100)
        self.assertEqual(100, self.conf.executor_thread_pool_size)
예제 #2
0
    def test_defaults(self):
        transport = mock.Mock()
        transport.conf = self.conf

        class MessageHandlingServerImpl(server.MessageHandlingServer):
            def _create_listener(self):
                pass

            def _process_incoming(self, incoming):
                pass

        MessageHandlingServerImpl(transport, mock.Mock())
        opts.set_defaults(self.conf, executor_thread_pool_size=100)
        self.assertEqual(100, self.conf.executor_thread_pool_size)
예제 #3
0
 def test_defaults(self):
     transport = mock.Mock()
     transport.conf = self.conf
     server.MessageHandlingServer(transport, mock.Mock())
     opts.set_defaults(self.conf, executor_thread_pool_size=100)
     self.assertEqual(100, self.conf.executor_thread_pool_size)
예제 #4
0
 def test_defaults(self):
     transport = mock.Mock()
     transport.conf = self.conf
     server.MessageHandlingServer(transport, mock.Mock())
     opts.set_defaults(self.conf, executor_thread_pool_size=100)
     self.assertEqual(100, self.conf.executor_thread_pool_size)
 def test_defaults(self):
     impl_thread.ThreadExecutor(self.conf, mock.Mock(), mock.Mock())
     opts.set_defaults(self.conf, executor_thread_pool_size=100)
     self.assertEqual(100, self.conf.executor_thread_pool_size)