Exemplo n.º 1
0
 def getServerConfig(self, addr, ro_svr):
     zconf = forker.ZEOConfig(addr, log='server.log')
     if ro_svr:
         zconf.read_only = 1
     if self.invq:
         zconf.invalidation_queue_size = self.invq
     if self.timeout:
         zconf.transaction_timeout = self.timeout
     return zconf
Exemplo n.º 2
0
 def getServerConfig(self, addr, ro_svr):
     zconf = forker.ZEOConfig(addr)
     if ro_svr:
         zconf.read_only = 1
     if self.monitor:
         zconf.monitor_address = ("", 42000)
     if self.invq:
         zconf.invalidation_queue_size = self.invq
     if self.timeout:
         zconf.transaction_timeout = self.timeout
     return zconf
Exemplo n.º 3
0
 def setUp(self):
     logger.info("setUp() %s", self.id())
     port = get_port()
     zconf = forker.ZEOConfig(('', port))
     zport, adminaddr, pid, path = forker.start_zeo_server(
         self.getConfig(), zconf, port)
     self._pids = [pid]
     self._servers = [adminaddr]
     self._conf_path = path
     self._storage = ClientStorage(zport,
                                   '1',
                                   cache_size=20000000,
                                   min_disconnect_poll=0.5,
                                   wait=1,
                                   wait_timeout=60)
     self._storage.registerDB(DummyDB(), None)
Exemplo n.º 4
0
 def setUp(self):
     logger.info("setUp() %s", self.id())
     port = get_port()
     zconf = forker.ZEOConfig(('', port))
     zport, adminaddr, pid, path = forker.start_zeo_server(
         self.getConfig(), zconf, port)
     self._pids = [pid]
     self._servers = [adminaddr]
     self._conf_path = path
     if not self.blob_cache_dir:
         # This is the blob cache for ClientStorage
         self.blob_cache_dir = tempfile.mkdtemp()
     self._storage = ClientStorage(zport,
                                   '1',
                                   cache_size=20000000,
                                   min_disconnect_poll=0.5,
                                   wait=1,
                                   wait_timeout=60,
                                   blob_dir=self.blob_cache_dir,
                                   shared_blob_dir=self.shared_blob_dir)
     self._storage.registerDB(DummyDB())