Class TestTimeoutWatcher

  • All Implemented Interfaces:
    org.junit.rules.TestRule

    public class TestTimeoutWatcher
    extends org.junit.rules.TestWatcher
    A test watcher that assumes possibility of threads being locked in process. A thread dump will be generated in case of test timeout.

    Standard usage:

         {@code
             public class SomeTest {
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void failed​(java.lang.Throwable e, org.junit.runner.Description description)  
      • Methods inherited from class org.junit.rules.TestWatcher

        apply, finished, skipped, skipped, starting, succeeded
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TestTimeoutWatcher

        public TestTimeoutWatcher()
    • Method Detail

      • failed

        protected void failed​(java.lang.Throwable e,
                              org.junit.runner.Description description)
        Overrides:
        failed in class org.junit.rules.TestWatcher