Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1753

TestMixedLockManagerLockPermutation: Timing issue determines the pass/no-pass of the test case

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.0
    • 2.0.1, 2.1.0
    • None
    • None

    Description

      This test case spawns three threads and the pass/no pass of the test cases depends on the timing.

      One example is TestMixedLockManagerFindPermutation.testFindReadPessimisticRead:
      commonFindTest(
      "testFind(Read,Commit/PessimisticRead,Rollback)",
      LockModeType.READ, Act.CommitTx, 1, null,
      LockModeType.PESSIMISTIC_READ, Act.RollbackTx, 1, null);

      If the find by the second child [Thread-8] is executed before the jdbc commit of the update statement by the first child [Thread-7], the test will fail. Attached are the trace file for the successful run and failing run.

      Attachments

        1. trace_fail.txt
          12 kB
          Fay Wang
        2. trace_success.txt
          10 kB
          Fay Wang

        Activity

          People

            allee8285 Albert Lee
            faywang Fay Wang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: