OpenJPA
  1. OpenJPA
  2. OPENJPA-1753

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.0.1, 2.1.0
    • Component/s: None
    • Labels:
      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.

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

        Activity

        Fay Wang created issue -
        Fay Wang made changes -
        Field Original Value New Value
        Attachment trace_fail.txt [ 12450911 ]
        Attachment trace_success.txt [ 12450912 ]
        Albert Lee made changes -
        Assignee Albert Lee [ allee8285 ]
        Albert Lee made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0.1 [ 12314532 ]
        Resolution Fixed [ 1 ]
        Michael Dick made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Albert Lee
            Reporter:
            Fay Wang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development