Exemple #1
0
    def setUp(self):
        self.root = tempfile.mkdtemp()
        self.cache = os.path.join(self.root, 'cache')
        os.mkdir(self.cache)

        context.GLOBAL.cell = 'test'
        context.GLOBAL.zk.url = 'zookeeper://xxx@yyy:123'
        self.evmgr = eventmgr.EventMgr(root=self.root)
        treadmill.watchdog.Watchdog.assert_called_with(
            os.path.join(self.root, 'watchdogs'), )
    def setUp(self):
        self.root = tempfile.mkdtemp()
        self.cache = os.path.join(self.root, 'cache')
        os.mkdir(self.cache)

        context.GLOBAL.cell = 'test'
        context.GLOBAL.zk.url = 'zookeeper://xxx@yyy:123'

        self.evmgr = eventmgr.EventMgr(root=self.root)
        self.evmgr.tm_env.root = self.root
        self.evmgr.tm_env.cache_dir = self.cache
 def eventdaemon(approot):
     """Listens to Zookeeper events."""
     evmgr = eventmgr.EventMgr(root=approot)
     evmgr.run()