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

google.api_core.exceptions.MethodNotImplemented when tests run in parallel

Details

    Description

      An error is thrown when tests run in parallel for interactive modules.

      >google.api_core.exceptions.MethodNotImplemented: 501 Received http2 header with status: 404

       

      The cause is shared global singleton among tests: a cluster related test registers a cluster manager in the global state while a non-cluster test cleans up the global state without necessary mocking.

      The solution should be mock the global singleton in tests to isolate tests from each other.

      To reproduce the failure (note: parallel execution is non-deterministic), add something like '-n 5' when executing pytests.

      For example:

      >pytest -n 5 apache_beam/runners/interactive/interactive_runner_test.py

      Attachments

        Issue Links

          Activity

            People

              ningk Ning
              ningk Ning
              Votes:
              0 Vote for this issue
              Watchers:
              1 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 - 50m
                  50m