Package generic.test

Class TestThread

java.lang.Object
java.lang.Thread
generic.test.TestThread
All Implemented Interfaces:
Runnable

public class TestThread extends Thread
  • Field Details

  • Method Details

    • isTestThread

      public static boolean isTestThread()
      Returns true if the current thread is the test thread
      Returns:
      true if the current thread is the test thread
    • isTestThread

      public static boolean isTestThread(Thread t)
      Returns true if the given thread is the test thread
      Parameters:
      t - the thread to check
      Returns:
      true if the given thread is the test thread
    • isTestThreadName

      public static boolean isTestThreadName(String name)
      Returns true if the given thread name is the test thread name
      Parameters:
      name - the thread name to check
      Returns:
      true if the given thread name is the test thread name
    • filterTrace

      public static StackTraceElement[] filterTrace(StackTraceElement[] trace)
      Filters the given stack trace to remove entries known to be present in the test thread that offer little forensic value
      Parameters:
      trace - the trace to filter
      Returns:
      the filtered trace
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread