[ 
https://issues.apache.org/jira/browse/BEAM-11476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17283211#comment-17283211
 ] 

Brian Hulette commented on BEAM-11476:
--------------------------------------

[~ningk] it looks like this is still flaking. Here's a failure from yesterday: 
https://ci-beam.apache.org/job/beam_PreCommit_Python_Commit/17254/testReport/junit/apache_beam.runners.interactive.interactive_environment_test/InteractiveEnvironmentTest/test_track_user_pipeline_cleanup_non_inspectable_pipeline/

{code}
self = 
<apache_beam.runners.interactive.interactive_environment_test.InteractiveEnvironmentTest
 testMethod=test_track_user_pipeline_cleanup_non_inspectable_pipeline>

    def test_track_user_pipeline_cleanup_non_inspectable_pipeline(self):
      ie.new_env()
      with patch('apache_beam.runners.interactive.interactive_environment'
                 '.InteractiveEnvironment.cleanup') as mocked_cleanup:
        dummy_pipeline_1 = beam.Pipeline()
        dummy_pipeline_2 = beam.Pipeline()
        dummy_pipeline_3 = beam.Pipeline()
        dummy_pipeline_4 = beam.Pipeline()
        dummy_pcoll = dummy_pipeline_4 | beam.Create([1])
        dummy_pipeline_5 = beam.Pipeline()
        dummy_non_inspectable_pipeline = 'dummy'
        ie.current_env().watch(locals())
        from apache_beam.runners.interactive.background_caching_job import 
BackgroundCachingJob
        ie.current_env().set_background_caching_job(
            dummy_pipeline_1,
            BackgroundCachingJob(
                runner.PipelineResult(runner.PipelineState.DONE), limiters=[]))
        ie.current_env().set_test_stream_service_controller(
            dummy_pipeline_2, None)
        ie.current_env().set_cache_manager(
            cache.FileBasedCacheManager(), dummy_pipeline_3)
        ie.current_env().mark_pcollection_computed([dummy_pcoll])
        ie.current_env().set_cached_source_signature(
            dummy_non_inspectable_pipeline, None)
        ie.current_env().set_pipeline_result(
            dummy_pipeline_5, 
runner.PipelineResult(runner.PipelineState.RUNNING))
>       mocked_cleanup.assert_not_called()

apache_beam/runners/interactive/interactive_environment_test.py:253: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

_mock_self = <MagicMock name='cleanup' id='139758058304456'>

    def assert_not_called(_mock_self):
        """assert that the mock was never called.
        """
        self = _mock_self
        if self.call_count != 0:
            msg = ("Expected '%s' to not have been called. Called %s times." %
                   (self._mock_name or 'mock', self.call_count))
>           raise AssertionError(msg)
E           AssertionError: Expected 'cleanup' to not have been called. Called 
1 times.
{code}

> flaky test: test_track_user_pipeline_cleanup_non_inspectable_pipeline
> ---------------------------------------------------------------------
>
>                 Key: BEAM-11476
>                 URL: https://issues.apache.org/jira/browse/BEAM-11476
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Udi Meiri
>            Assignee: Ning Kang
>            Priority: P1
>              Labels: currently-failing, flake
>          Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> Test name: 
> apache_beam.runners.interactive.interactive_environment_test.InteractiveEnvironmentTest.test_track_user_pipeline_cleanup_non_inspectable_pipeline
> {code}
> Error Message
> AssertionError: Expected 'cleanup' to not have been called. Called 1 times.
> Stacktrace
> self = 
> <apache_beam.runners.interactive.interactive_environment_test.InteractiveEnvironmentTest
>  testMethod=test_track_user_pipeline_cleanup_non_inspectable_pipeline>
> mocked_cleanup = <MagicMock name='cleanup' id='140386685111432'>
>     @patch(
>         'apache_beam.runners.interactive.interactive_environment'
>         '.InteractiveEnvironment.cleanup')
>     def test_track_user_pipeline_cleanup_non_inspectable_pipeline(
>         self, mocked_cleanup):
>       ie._interactive_beam_env = None
>       ie.new_env()
>       dummy_pipeline_1 = beam.Pipeline()
>       dummy_pipeline_2 = beam.Pipeline()
>       dummy_pipeline_3 = beam.Pipeline()
>       dummy_pipeline_4 = beam.Pipeline()
>       dummy_pcoll = dummy_pipeline_4 | beam.Create([1])
>       dummy_pipeline_5 = beam.Pipeline()
>       dummy_non_inspectable_pipeline = 'dummy'
>       ie.current_env().watch(locals())
>       from apache_beam.runners.interactive.background_caching_job import 
> BackgroundCachingJob
>       ie.current_env().set_background_caching_job(
>           dummy_pipeline_1,
>           BackgroundCachingJob(
>               runner.PipelineResult(runner.PipelineState.DONE), limiters=[]))
>       ie.current_env().set_test_stream_service_controller(dummy_pipeline_2, 
> None)
>       ie.current_env().set_cache_manager(
>           cache.FileBasedCacheManager(), dummy_pipeline_3)
>       ie.current_env().mark_pcollection_computed([dummy_pcoll])
>       ie.current_env().set_cached_source_signature(
>           dummy_non_inspectable_pipeline, None)
>       ie.current_env().set_pipeline_result(
>           dummy_pipeline_5, 
> runner.PipelineResult(runner.PipelineState.RUNNING))
> >     mocked_cleanup.assert_not_called()
> apache_beam/runners/interactive/interactive_environment_test.py:265: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> _mock_self = <MagicMock name='cleanup' id='140386685111432'>
>     def assert_not_called(_mock_self):
>         """assert that the mock was never called.
>         """
>         self = _mock_self
>         if self.call_count != 0:
>             msg = ("Expected '%s' to not have been called. Called %s times." %
>                    (self._mock_name or 'mock', self.call_count))
> >           raise AssertionError(msg)
> E           AssertionError: Expected 'cleanup' to not have been called. 
> Called 1 times.
> /usr/lib/python3.7/unittest/mock.py:792: AssertionError
> {code}
> https://ci-beam.apache.org/job/beam_PreCommit_Python_Cron/3609/
> https://ci-beam.apache.org/job/beam_PreCommit_Python_Cron/3607/
> https://ci-beam.apache.org/job/beam_PreCommit_Python_Cron/3593/



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to