Cask Data Application Platform - Develop Build and Test

Build: #2203 failed Manual run by Rohit Sinha

Code commits

CDAP

  • albertshau <ashau@google.com>

    albertshau <ashau@google.com> 581c2f6dca78f4c2c7477524bafc1adc4692c492

    Merge pull request #10174 from caskdata/feature/CDAP-13296-fix-program-status-race
    CDAP-13296 fix race in program status call

  • Albert Shau <ashau@desktobert.svl.corp.google.com>

    Albert Shau <ashau@desktobert.svl.corp.google.com> 62d442fb3f16d527b3c9087a3f429b3529397645 m

    CDAP-13296 fix race in program status call
    The call to get a program status was suspectible to races because
    run records for the program were not read in a single transaction.
    If run state happened to change in between run record reads, the
    state could incorrectly be returned as stopped.

    This race condition would cascade and cause other tests to fail
    that would wait for a program run to complete. If one of those
    tests ran into this scenario, the test would move on assuming
    the program had stopped when it in fact was still running.

    Fixed to read run records in a single transaction, and added
    missing unit tests.

    Also fixing a bug where a suspended program would have a stopped
    status instead of a running status.

    • cdap-app-fabric-tests/src/test/java/co/cask/cdap/internal/app/services/http/handlers/WorkflowHttpHandlerTest.java (version 62d442fb3f16d527b3c9087a3f429b3529397645)
    • cdap-app-fabric/src/main/java/co/cask/cdap/internal/app/services/ProgramLifecycleService.java (version 62d442fb3f16d527b3c9087a3f429b3529397645)
    • cdap-app-fabric/src/test/java/co/cask/cdap/internal/app/services/ProgramLifecycleServiceTest.java (version 62d442fb3f16d527b3c9087a3f429b3529397645)
    • cdap-app-fabric/src/test/java/co/cask/cdap/internal/app/store/AppMetadataStoreTest.java (version 62d442fb3f16d527b3c9087a3f429b3529397645)