def testAnalyzeBuildFailurePipelineAbortedWithoutAnalysis(self): master_name = 'm' builder_name = 'b' build_number = 124 root_pipeline = AnalyzeBuildFailurePipeline(master_name, builder_name, build_number) root_pipeline._LogUnexpectedAborting(True) analysis = WfAnalysis.Get(master_name, builder_name, build_number) self.assertIsNone(analysis)
def testAnalyzeBuildFailurePipelineNotAborted(self): master_name = 'm' builder_name = 'b' build_number = 124 self._Setup(master_name, builder_name, build_number) root_pipeline = AnalyzeBuildFailurePipeline(master_name, builder_name, build_number) root_pipeline._LogUnexpectedAborting(False) analysis = WfAnalysis.Get(master_name, builder_name, build_number) self.assertIsNotNone(analysis) self.assertNotEqual(wf_analysis_status.ERROR, analysis.status)
def testAnalyzeBuildFailurePipelineNotAbortedIfWithoutError(self): master_name = 'm' builder_name = 'b' build_number = 124 self._Setup(master_name, builder_name, build_number, status=analysis_status.COMPLETED) root_pipeline = AnalyzeBuildFailurePipeline(master_name, builder_name, build_number, False, False) root_pipeline._LogUnexpectedAborting(True) analysis = WfAnalysis.Get(master_name, builder_name, build_number) self.assertIsNotNone(analysis) self.assertNotEqual(analysis_status.ERROR, analysis.status)