org.apache.lucene.util

## Class TestRuleIgnoreAfterMaxFailures

- java.lang.Object
- - org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures

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

      public final class TestRuleIgnoreAfterMaxFailures
      extends Object
      implements org.junit.rules.TestRule

  This rule keeps a count of failed tests (suites) and will result in an `AssumptionViolatedException` after a given number of failures for all tests following this condition.

  Aborting quickly on failed tests can be useful when used in combination with test repeats (via the `Repeat` annotation or system property).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TestRuleIgnoreAfterMaxFailures(int maxFailures)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.junit.runners.model.Statement` | `apply(org.junit.runners.model.Statement s, Description d)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TestRuleIgnoreAfterMaxFailures

          public TestRuleIgnoreAfterMaxFailures(int maxFailures)

      Parameters:
        `maxFailures` - The number of failures after which all tests are ignored. Must be greater or equal 1.

  - ### Method Detail

    - #### apply

          public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement s,
                                                         Description d)

      Specified by:
        `apply` in interface `org.junit.rules.TestRule`

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.