Ejemplo n.º 1
0
 def test_check_log(self):
     start_time = time.time()
     PSQL.run_sql_command(
         "SELECT * from some_table_that_does_not_exist_to_generate_errors_in_logs"
     )
     time.sleep(2)
     end_time = time.time()
     self.assertTrue(GpLog.check_log_for_errors(start_time, end_time))
Ejemplo n.º 2
0
Archivo: mpp_tc.py Proyecto: 50wu/gpdb
    def inspect_cluster(self):
        """
        This function will inspect the cluster from the start time of this test till now.
        Returns true if there are no errors in logs, False if there are errors in logs.

        @return: Returns True / False depending on whether errors were found in the log
        @rtype: boolean
        """
        tinctest.logger.trace_in()
        start_time = self.start_time
        if start_time == 0 or not start_time:
            return True
        end_time = self.end_time
        if end_time == 0 or not end_time:
            end_time = time.time()

        return_status = not GpLog.check_log_for_errors(start_time, end_time)
        tinctest.logger.trace_out(str(return_status))
        return return_status
Ejemplo n.º 3
0
    def inspect_cluster(self):
        """
        This function will inspect the cluster from the start time of this test till now.
        Returns true if there are no errors in logs, False if there are errors in logs.

        @return: Returns True / False depending on whether errors were found in the log
        @rtype: boolean
        """
        tinctest.logger.trace_in()
        start_time = self.start_time
        if start_time == 0 or not start_time:
            return True
        end_time = self.end_time
        if end_time == 0 or not end_time:
            end_time = time.time()

        return_status = not GpLog.check_log_for_errors(start_time, end_time)
        tinctest.logger.trace_out(str(return_status))
        return return_status
Ejemplo n.º 4
0
 def test_check_log(self):
     start_time = time.time()
     PSQL.run_sql_command("SELECT * from some_table_that_does_not_exist_to_generate_errors_in_logs")
     time.sleep(2)
     end_time = time.time()
     self.assertTrue(GpLog.check_log_for_errors(start_time, end_time))