Esempio n. 1
0
 def create_gateway_property(self):
     gateway_property = InstrGatewayProperty(
         self.java_parameters.auto_field, PythonProxyPool(),
         self.java_parameters.enable_memory_management)
     if self.python_server_entry_point:
         gateway_property.pool.put(self.python_server_entry_point,
                                   proto.ENTRY_POINT_OBJECT_ID)
     return gateway_property
Esempio n. 2
0
 def create_gateway_property(cls,
                             gateway_parameters,
                             python_server_entry_point=None):
     gateway_property = InstrGatewayProperty(
         gateway_parameters.auto_field, PythonProxyPool(),
         gateway_parameters.enable_memory_management)
     if python_server_entry_point:
         gateway_property.pool.put(python_server_entry_point,
                                   proto.ENTRY_POINT_OBJECT_ID)
     return gateway_property
Esempio n. 3
0
    def testPool(self):
        pool = PythonProxyPool()
        runners = [Runner(range(0, 10000), pool) for _ in range(0, 3)]
        for runner in runners:
            runner.start()

        for runner in runners:
            runner.join()

        for runner in runners:
            self.assertTrue(runner.ok)