Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-8554

Automatically interrupt hung tests

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 9.3.0.Final
    • 9.2.0.Final
    • Test Suite
    • None

      Tests should always use timed wait, e.g. future.get(10, SECONDS) instead of future.get(). However, it's really easy to use the wrong method, and if a deadlock happens the test suite will never finish.

      Jenkins builds do have a timeout, but the timeout kill procedure is not at all investigation-friendly: only the console output survives, the logs and test results don't.

      We can add a listener (IHookable in TestNG, because regular listeners are not always invoked on the same thread as the test method) to detect when a test has been running for too long and interrupt the test thread. We can even save a thread dump to make the investigation easier.

              dberinde@redhat.com Dan Berindei (Inactive)
              dberinde@redhat.com Dan Berindei (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: