Class ESMockAPIBasedRepositoryIntegTestCase.ErroneousHttpHandler
java.lang.Object
org.elasticsearch.repositories.blobstore.ESMockAPIBasedRepositoryIntegTestCase.ErroneousHttpHandler
- All Implemented Interfaces:
HttpHandler,ESMockAPIBasedRepositoryIntegTestCase.DelegatingHttpHandler
- Enclosing class:
ESMockAPIBasedRepositoryIntegTestCase
protected abstract static class ESMockAPIBasedRepositoryIntegTestCase.ErroneousHttpHandler
extends Object
implements ESMockAPIBasedRepositoryIntegTestCase.DelegatingHttpHandler
HTTP handler that injects random service errors
Note: it is not a good idea to allow this handler to simulate too many errors as it would
slow down the test suite.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedErroneousHttpHandler(HttpHandler delegate, int maxErrorsPerRequest) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanFailRequest(HttpExchange exchange) voidhandle(HttpExchange exchange) protected voidhandleAsError(HttpExchange exchange) protected abstract StringrequestUniqueId(HttpExchange exchange)
-
Field Details
-
delegate
-
-
Constructor Details
-
ErroneousHttpHandler
-
-
Method Details
-
handle
- Specified by:
handlein interfaceHttpHandler- Throws:
IOException
-
handleAsError
- Throws:
IOException
-
requestUniqueId
-
canFailRequest
-
getDelegate
- Specified by:
getDelegatein interfaceESMockAPIBasedRepositoryIntegTestCase.DelegatingHttpHandler
-