Annotation Type Timeout


  • @Retention(RUNTIME)
    @Target({METHOD,TYPE})
    @Inherited
    public @interface Timeout
    Maximum execution time for a single test method. Test methods are defined as any instance-scope TestRules, Before and After hooks and Test methods. Suite class's constructor is not part of the measured code (see TimeoutSuite).

    Overrides a global default RandomizedRunner.DEFAULT_TIMEOUT or a system property override SysGlobals.SYSPROP_TIMEOUT.

    See Also:
    TimeoutSuite
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      int millis
      Timeout time in millis.
    • Element Detail

      • millis

        int millis
        Timeout time in millis. The timeout time is approximate, it may take longer to actually abort the test case.