Class ChaosDriver

All Implemented Interfaces:
Driver

@DriverCapability(prefix="chaos", description="Injects configurable failures and latency for resilience testing", capabilities={"testing","resilience"}) @DriverParameter(name="failureRate",type=FLOAT,description="Probability of throwing SQLException per query",defaultValue="0.0") @DriverParameter(name="latency",type=INTEGER,description="Fixed delay in milliseconds before each query",defaultValue="0",min=0L) @DriverParameter(name="latencyVariance",type=INTEGER,description="Random additional delay up to this value in ms",defaultValue="0",min=0L) @DriverParameter(name="connectionDropRate",type=FLOAT,description="Probability of closing connection unexpectedly",defaultValue="0.0") @DriverParameter(name="resultSetLatency",type=INTEGER,description="Delay in ms for each ResultSet.next() call",defaultValue="0",min=0L) @DriverParameter(name="exceptionMessage",type=STRING,description="Custom exception message",defaultValue="ChaosDriver: Induced failure") public class ChaosDriver extends AbstractProxyDriver
ChaosDriver injects configurable failures and latency for resilience testing.

URL format: jdbc:chaos[param=value,...]:jdbc:target:...

Example URLs:

 jdbc:chaos[failureRate=0.1]:jdbc:postgresql://localhost/mydb
 jdbc:chaos[latency=100,latencyVariance=50]:jdbc:h2:mem:test
 jdbc:chaos[failureRate=0.05,connectionDropRate=0.01]:jdbc:mysql://localhost/db