New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 730900 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 0
Type: Bug



Sign in to add a comment

[Findit] Flake Analyzer - user-specified iterations not being passed correctly

Project Member Reported by lijeffrey@chromium.org, Jun 8 2017

Issue description

recursive_flake_try_job_pipline isn't passing the user's specified iterations correctly to the next call of RecursiveFlakeTryJobPipeline in NextBuildNumberPipeline, causing the expected args to be incorrect
 
Status: Started (was: Assigned)
Why this was not caught by unit tests:

Unit tests for functions using "with pipeline.InOrder()" seem to ignore the parameters passed to mocked pipelines for testing.

For example, if in product code:

class TestPipeline(BasePipeline):

def run(self, arg0):
  with pipeline.InOrder():
    arg1 = 'blabla'
    arg2 = 'blabla'
  
    yield PipelineA(arg1, arg2)
    yield PipelineB(arg1, arg2)

and in test code:

self.MockPipeline(
  PipelineA, 'thing PipelineA yields,
  expected_args=['you', 'can', 'put', 'anything', 'you', 'want'])
TestPipeline('blabla').run()

The test will always pass even with invalid args in the mocked pipeline.

Mocking pipeline.InOrder() at the beginning of the test seems to solve this.

After further investigation it seems the above description is an over-simplification: In the unit test itself MonitorTryJobPipeline is being called, however it relies on callbacks which may cause issues in unit tests. Thus the pipelines following MonitorTryJobPipeline never get called, allowing the test to pass incorrectly afterward since the pipelines don't even get run
Status: Fixed (was: Started)

Sign in to add a comment