示例#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)