Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-1589

TestZKLocksService is flakey

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • trunk
    • 4.1.0
    • tests
    • None

    Description

      TestZKLocksService is highly dependent on the order of things happening because its testing locks. I've seen tests in this class fail a number of times with messages like this:

      expected:<a:[1-L a:2-L a:1-U] a:2-U> but was:<a:[2-L a:1-L] a:2-U>
      

      which is because things happened in a slightly different order than it was expecting (though everything is happening correctly)

      When I created these tests, I just took the TestLockService and made it use ZKLocks instead of MemoryLocks. The ZKLocks take longer to lock than the MemoryLocks, so the timings are sometimes too fast. I think we just need to increase the sleep calls, and use the sleep() method instead of Thread.sleep() so it will scale with the "waitfor ratio" on slower machines.

      Attachments

        1. OOZIE-1589.patch
          4 kB
          Robert Kanter

        Activity

          People

            rkanter Robert Kanter
            rkanter Robert Kanter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: