Ejemplo n.º 1
0
class TestBaseConfig(unittest.TestCase):
    """TestBaseConfig:test BaseConfig"""
    def setUp(self):
        """set up"""
        self.baseConfObj = BaseConfig()
        self.logQueue = Queue.Queue(-1)
        processName = 'testBaseConfig'
        rootpath = "/data/logs/test"
        self.globalLog = MultiLogHandle(self.logQueue,
                rootpath, processName, "testBase")

    def testJavaTrace(self):
        """testJavaTrace"""
        self.assertEqual("tracing.log",
                os.path.basename(self.baseConfObj.getJavaTrace()))

    def testPid(self):
        """testPid"""
        self.assertEqual("aggregate.pid",
                os.path.basename(self.baseConfObj.getPidFile("aggregate")))
        self.assertEqual("dubbo.pid",
                os.path.basename(self.baseConfObj.getPidFile("dubbo")))

    def testKafkaConf(self):
        """testKafkaConf"""
        self.assertEqual("kafka.ini",
                os.path.basename(self.baseConfObj.getKafkaConf()))
Ejemplo n.º 2
0
 def setUp(self):
     """set up"""
     self.baseConfObj = BaseConfig()
     self.logQueue = Queue.Queue(-1)
     processName = 'testBaseConfig'
     rootpath = "/data/logs/test"
     self.globalLog = MultiLogHandle(self.logQueue,
             rootpath, processName, "testBase")