示例#1
0
    def execute_analysis_06(self, test):
        analysis = test.get_analysis(WaitAnalysis_B)
        if analysis:
            return True

        analysis = self.create_analysis(test)
        return self.delay_analysis(test, analysis, seconds=2)
示例#2
0
    def execute_analysis_delayed(self, test):
        analysis = test.get_analysis(PostAnalysisTestResult)
        if analysis is None:
            analysis = self.create_analysis(test)
            self.delay_analysis(test, analysis, seconds=3)

        return True
示例#3
0
文件: test.py 项目: triplekill/ACE
    def execute_analysis(self, test):
        analysis = test.get_analysis(DelayedAnalysisTimeoutTestResult)
        if not analysis:
            analysis = self.create_analysis(test)

        # the observable value is the format M:SS|M:SS
        delay, timeout = test.value.split('|')
        delay_minutes, delay_seconds = map(int, delay.split(':'))
        timeout_minutes, timeout_seconds = map(int, timeout.split(':'))
        return self.delay_analysis(test, analysis, minutes=delay_minutes, seconds=delay_seconds, 
                                   timeout_minutes=timeout_minutes, timeout_seconds=timeout_seconds)
示例#4
0
文件: test.py 项目: triplekill/ACE
    def execute_analysis(self, test):
        analysis = test.get_analysis(DelayedAnalysisTestAnalysis)
        if not analysis:
            analysis = self.create_analysis(test)
            # the observable value is the format M:SS|M:SS
            delay, timeout = test.value.split('|')
            delay_minutes, delay_seconds = map(int, delay.split(':'))
            timeout_minutes, timeout_seconds = map(int, timeout.split(':'))
            return self.delay_analysis(test, analysis, minutes=delay_minutes, seconds=delay_seconds, 
                                       timeout_minutes=timeout_minutes, timeout_seconds=timeout_seconds)

        analysis.details[KEY_DELAYED_REQUEST] = True
        analysis.details[KEY_REQUEST_COUNT] += 1
        analysis.details[KEY_COMPLETE_TIME] = datetime.datetime.now()
        return True