Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-3536

LRA timeout test failure because of "wedged" ReaperElement

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 5.11.3.Final
    • LRA, Testing
    • None
    • Hide

      The failure is time sensitive and difficult to reproduce. Perhaps just running the test many times could trigger it (maybe also load the system while running the test:

       

       mvn test -Dtest=LRATest#testTimeout -f rts/lra/coordinator/pom.xml

       

      Show
      The failure is time sensitive and difficult to reproduce. Perhaps just running the test many times could trigger it (maybe also load the system while running the test:   mvn test -Dtest=LRATest#testTimeout -f rts/lra/coordinator/pom.xml  

      The fix for JBTM-3533 uses the TransactionReaper to manage LRA timeouts.

      A new test was added for the work (LRATest.java#testTimeout) where the participant sleeps for longer than the LRA timeout (to verify that the reaper cancels the LRA).

      However, this test was seen to fail on a CI run (on a pull request) because the reaper reported the the participant (a ReaperElement) as "wedged" (see attached test output file). The reason is as follows:

      The reaper sees it as wedged because the participant is running in the same VM as the test and the participant sleeps (Thread.sleep(2000)) to allow time for the timeout to expire. So this test failure is actually a false positive because the reaper reinserts the element into the timeout queue marking it as ABORT_ONLY and since LongRunningAction extends BasicAction it handles the ActionStatus.ABORT_ONLY state correctly.

       

      The tests needs updating to accommodate this race condition.

            rhn-engineering-mmusgrov Michael Musgrove
            rhn-engineering-mmusgrov Michael Musgrove
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: