Source code for faust.livecheck.exceptions

"""LiveCheck - related exceptions."""

__all__ = [
    'LiveCheckError',
    'SuiteFailed',
    'ServiceDown',
    'SuiteStalled',
    'TestSkipped',
    'TestFailed',
    'TestRaised',
    'TestTimeout',
]


[docs]class LiveCheckError(Exception): """Generic base class for LiveCheck test errors."""
[docs]class SuiteFailed(LiveCheckError): """The whole test suite failed (not just a test)."""
[docs]class ServiceDown(SuiteFailed): """Suite failed after a depending service is not responding. Used when for example a test case is periodically sending requests to a HTTP service, and that HTTP server is not responding. """
[docs]class SuiteStalled(SuiteFailed): """The suite is not running. Raised when ``warn_stalled_after=3600`` is set and there has not been any execution requests in the last hour. """
[docs]class TestSkipped(LiveCheckError): """Test was skipped."""
[docs]class TestFailed(LiveCheckError): """The test failed an assertion."""
[docs]class TestRaised(LiveCheckError): """The test raised an exception."""
[docs]class TestTimeout(LiveCheckError): """The test timed out waiting for an event or during processing."""