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

Automatically interrupt hung tests

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Activity

          People

            dberinde@redhat.com Dan Berindei (Inactive)
            dberinde@redhat.com Dan Berindei (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: