def run_post_sqls(self, fault_name ='', trans_state=''): checkDBUp() if (trans_state == 'failover_to_primary' or trans_state == ''): post_sql = "failover_sql/subt_create_table_ao_post_commit" else: post_sql = "failover_sql/subt_create_table_ao_post_abort" sql_file = post_sql+".sql" ans_file = post_sql+".ans" out_file = post_sql+".out" PSQL.run_sql_file(sql_file = local_path(sql_file), out_file = local_path(out_file)) diff_res = Gpdiff.are_files_equal(local_path(out_file), local_path(ans_file)) tinctest.logger.info("[STLRTest] printing gp segment configuration") (gp_seg_conf) = PSQL.run_sql_command("select * from gp_segment_configuration order by dbid") tinctest.logger.info(gp_seg_conf) if not diff_res: self.fail("[STLRTest]Gpdiff failed for : %s %s" %(fault_name, trans_state))
def check_db(self): checkDBUp()