Class FailFastBuilder


  • public class FailFastBuilder
    extends Object
    The class provides support to create FailFastCheck {@see MultipleFailFastChecksHandler} that checks if a waiter should fail due to an error state of cluster. The function is supposed to be called by a Waiter. If it returns true, the waiter should throw an exception.

    Example of use:

     FailFastBuilder
             .ofTestAndBuildNamespace()
             .events()
             .after(EventHelper.timeOfLastEventBMOrTestNamespaceOrEpoch())
             .ofNames("my-app.*")
             .ofMessages("Failed.*")
             .atLeasOneExists()
             .build()
     

    You can create more checks for events and every one of them will be checked. If one of them returns true, the whole fail fast function returns true.