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

ParDoLifecycleTest: exception throwing tests broken

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.13.0
    • Component/s: sdk-java-core
    • Labels:
      None

      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

              • Assignee:
                michel Michael Luckey
                Reporter:
                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