コード例 #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))
コード例 #2
0
ファイル: mpp_tc.py プロジェクト: 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
コード例 #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
コード例 #4
0
ファイル: regress_gplog.py プロジェクト: PengJi/gpdb-comments
 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))