Class ChaosLayer
java.lang.Object
org.apache.opendal.Layer
org.apache.opendal.layer.ChaosLayer
Injects temporary
OpenDALException.Code.Unexpected errors when opening
a read or reading data, to exercise error handling in tests.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionChaosLayer(double errorRatio) Creates a layer with the supplied error ratio. -
Method Summary
-
Constructor Details
-
ChaosLayer
public ChaosLayer(double errorRatio) Creates a layer with the supplied error ratio.- Parameters:
errorRatio- the chance that a read call fails, from 0.0 (none) to 1.0 (all), rounded down to a whole percentage point- Throws:
IllegalArgumentException- if the ratio is outside [0.0, 1.0] or is NaN
-
-
Method Details
-
layer
-