Class TestTimeout

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

    public class TestTimeout
    extends Object
    implements org.junit.rules.TestRule
    Rule to timeout a test.
    • Constructor Detail

      • TestTimeout

        public TestTimeout​(int fMillis)
      • TestTimeout

        public TestTimeout()
        Constructor: reads the default timeout value from the "test.timeout.milliseconds" property. If the property doesn't exist or has the value "0", the statement won't timeout.
    • Method Detail

      • apply

        public org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement base,
                                                       org.junit.runner.Description description)
        Specified by:
        apply in interface org.junit.rules.TestRule