Example #1
0
File: fault.py Project: LJoNe/gpdb
    def crash_system_after_checkpoint(self, mode):
        '''Issue checkpoint followed by gpstop -ai immediately '''
        newfault = Fault()
        if mode == 'InSync':
            #Sleep 10-15 min
            ntime =  randint(600, 900)
            tinctest.logger.info('sleep for %s sec...' %ntime)
            sleep(ntime)
        else:
            #Sleep 10-15 min
            ntime =  randint(600, 900)
            tinctest.logger.info('sleep for %s sec...' %ntime)
            sleep(ntime)
            
            #put system in CT
            is_ct_mode_enabled = self.do_changetracking()
            if not is_ct_mode_enabled:
                self.fail("Change Tracking mode not enabled!!")
            
            #Sleep 10-15 min
            ntime =  randint(600, 900)
            tinctest.logger.info('sleep for %s sec...' %ntime)
            sleep(ntime)

        #issue checkpoint
        newfault.issue_checkpoint()
        newfault.restart_db()
Example #2
0
File: fault.py Project: LJoNe/gpdb
    def test_drop_db_dir(self):
        ''' Drop Database dir only '''
        newfault = Fault()
        #Get segment host, data dir, and DB oid to create fault
        (hostname, dirloc, oid) =  newfault.get_host_dir_oid()

        # Move database dir to take it offline
        DirPath = dirloc + '/base/'+ oid
        newfault.drop_dir(hostname, DirPath)
        #issue checkpoint
        newfault.issue_checkpoint()
Example #3
0
File: fault.py Project: LJoNe/gpdb
 def test_partition_table_scenario(self):
     tinctest.logger.debug('Starting the Partition tables scenario')
     newfault = Fault()
     if newfault.issue_checkpoint():
         tinctest.logger.info('Checkpoint forced..')
     else:
         tinctest.logger.info('Unable to force checkpoint - Is the server running?')
         self.fail('Unable to force checkpoint - Check the server')
     newfault.restart_db()
     tinctest.logger.debug('Partition tables scenario completed')