Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-8977

apache_beam.runners.interactive.display.pcoll_visualization_test.PCollectionVisualizationTest.test_dynamic_plotting_update_same_display is flaky

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • Not applicable
    • test-failures
    • None

    Description

      Sample failure:
      https://builds.apache.org/job/beam_PreCommit_Python_Phrase/1273/testReport/apache_beam.runners.interactive.display.pcoll_visualization_test/PCollectionVisualizationTest/test_dynamic_plotting_update_same_display/

      Error Message

      IndexError: list index out of range

      Stacktrace
      self = <apache_beam.runners.interactive.display.pcoll_visualization_test.PCollectionVisualizationTest testMethod=test_dynamic_plotting_update_same_display>
      mocked_display_facets = <MagicMock name='display_facets' id='139889868386376'>

      @patch('apache_beam.runners.interactive.display.pcoll_visualization'
      '.PCollectionVisualization.display_facets')
      def test_dynamic_plotting_update_same_display(self,
      mocked_display_facets):
      fake_pipeline_result = runner.PipelineResult(runner.PipelineState.RUNNING)
      ie.current_env().set_pipeline_result(self._p, fake_pipeline_result)

      1. Starts async dynamic plotting that never ends in this test.
        h = pv.visualize(self._pcoll, dynamic_plotting_interval=0.001)
      2. Blocking so the above async task can execute some iterations.
        time.sleep(1)
      3. The first iteration doesn't provide updating_pv to display_facets.
        _, first_kwargs = mocked_display_facets.call_args_list[0]
        self.assertEqual(first_kwargs, {})
      4. The following iterations use the same updating_pv to display_facets and so
      5. on.
        > _, second_kwargs = mocked_display_facets.call_args_list[1]
        E IndexError: list index out of range

      apache_beam/runners/interactive/display/pcoll_visualization_test.py:105: IndexError

      Standard Output

      <IPython.core.display.HTML object>
      Standard Error
      WARNING:apache_beam.runners.interactive.interactive_environment:You cannot use Interactive Beam features when you are not in an interactive environment such as a Jupyter notebook or ipython terminal.

      Attachments

        Issue Links

          Activity

            People

              ningk Ning
              tvalentyn Valentyn Tymofieiev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 50m
                  2h 50m