Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-5882

ThreadExpiringThreadPoolTest fails 8% of time

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Commons Threads 3.2.6
    • Commons Threads 3.2.10
    • Commons
    • None

    Description

      The unit tests fail 8% of the time due to a) methods not being able to complete in time on slower (2.53 GHz 2 core) boxes, and b) the ThreadFactory using an unstable method of determining if a thread is in the pool or not. It relies on the thread being alive, however the thread that should be dead may have removed itself from the pool but not yet died when the test checks.

      Increasing the thread lifetime to 90ms from 15ms and pausing for 15ms to ensure that threads that expired have really removed themselves from the pool reduces the failure rate to below 0.1%. Making that 0% would need introspection of the pool rather than relying on the thread being alive as a proxy for being in the pool.

      commit pending.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ianeboston Ian Boston
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: