/** * Used only for internal testing purposes. Makes a stream unreliable in certain ways for * fault testing. * * @param content Input stream to make unreliable. * @return UnreliableFilterInputStream */ private InputStream wrapWithUnreliableStream(InputStream content) { return new UnreliableFilterInputStream(content, unreliableTestConfig.isFakeIOException()) .withBytesReadBeforeException( unreliableTestConfig.getBytesReadBeforeException()) .withMaxNumErrors(unreliableTestConfig.getMaxNumErrors()) .withResetIntervalBeforeException( unreliableTestConfig.getResetIntervalBeforeException()); }
/** * Used only for internal testing purposes. Makes a stream unreliable in certain ways for * fault testing. * * @param content Input stream to make unreliable. * @return UnreliableFilterInputStream */ private InputStream wrapWithUnreliableStream(InputStream content) { return new UnreliableFilterInputStream(content, unreliableTestConfig.isFakeIOException()) .withBytesReadBeforeException( unreliableTestConfig.getBytesReadBeforeException()) .withMaxNumErrors(unreliableTestConfig.getMaxNumErrors()) .withResetIntervalBeforeException( unreliableTestConfig.getResetIntervalBeforeException()); }
/** * Used only for internal testing purposes. Makes a stream unreliable in certain ways for * fault testing. * * @param content Input stream to make unreliable. * @return UnreliableFilterInputStream */ private InputStream wrapWithUnreliableStream(InputStream content) { return new UnreliableFilterInputStream(content, unreliableTestConfig.isFakeIOException()) .withBytesReadBeforeException( unreliableTestConfig.getBytesReadBeforeException()) .withMaxNumErrors(unreliableTestConfig.getMaxNumErrors()) .withResetIntervalBeforeException( unreliableTestConfig.getResetIntervalBeforeException()); }