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

ParDoLifecycleTest: exception throwing tests broken

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.13.0
    • sdk-java-core

    Description

      ParDoLifecycleTest implements tests to assert that DoFn are tore down after another lifecycle method throw an exception.

      The implementation uses a static AtomicBoolean for assertions [1]. Unfortunately, this is never reset which results in that boolean being true after the first test which happens to correctly call teardown on exception. Failures for tests executed after are essentially hidden.

      This can be seen e.g. by

      ./gradlew -p runners/spark/ validatesRunnerBatch --tests org.apache.beam.sdk.transforms.ParDoLifecycleTest.testTeardownCalledAfterExceptionInStartBundle 
      

      [1] https://github.com/apache/beam/blob/master/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoLifecycleTest.java#L407-L412

      Attachments

        Issue Links

          Activity

            People

              michel Michael Luckey
              michel Michael Luckey
              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 - 4h
                  4h