def test_rebuild_persistent_objects_master(self):
     ptutil = PTRebuildUtil()
     if ptutil.check_dbconnections():
         tinctest.logger.info('As there are active Database connections, cant rebuild PT')
         return
     tinctest.logger.info('Rebuilding Global Persistent Object on Master')
     ptutil.persistent_Rebuild()
 def test_rebuild_persistent_objects(self):
     ptutil = PTRebuildUtil()
     if ptutil.check_dbconnections():
         tinctest.logger.info('As there are active Database connections, cant rebuild PT')
         return
     (hostname, port) = ptutil.get_hostname_port_of_segment()
     tinctest.logger.info('Rebuilding Global Persistent Object on segment %s : %s'%(hostname, port))
     ptutil.persistent_Rebuild(hostname, port, 'Segment')