You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The xk6-disruptor API is built around the concept of disruptors that inject faults. Presently, each disruptor implements one method for each type of fault it injects and different disruptors can implement the same method if they are able to inject the same type of fault. For example, ServiceDisruptor and PodDisruptor both implement the InjectHTTPFault method for injecting HttpFaults.
This API is exposed to the JS code by a series of adaprters that validates and convert the objects received from Javascript, delegates the execution to the corresponding disruptor and return the result or raises an error.
Replicating the methods for fault injection in multiple disruptors creates significant duplication in the implementation of the JS API: each adapter must re-implement the methods of the disruptor that it wraps.
Following the example above, the adapters for PodDisruptor and ServiceDisruptor must both implement the method InjectHTTPFault. This duplication will increase as more fault types and disruptors are added. For example, it is to be expected that both the PodDisruptor and a future NodeDisruptor implements an InjectNetworkFaults method for injecting network-level faults.
The text was updated successfully, but these errors were encountered:
The xk6-disruptor API is built around the concept of disruptors that inject faults. Presently, each disruptor implements one method for each type of fault it injects and different disruptors can implement the same method if they are able to inject the same type of fault. For example,
ServiceDisruptor
andPodDisruptor
both implement theInjectHTTPFault
method for injectingHttpFaults
.This API is exposed to the JS code by a series of adaprters that validates and convert the objects received from Javascript, delegates the execution to the corresponding disruptor and return the result or raises an error.
Replicating the methods for fault injection in multiple disruptors creates significant duplication in the implementation of the JS API: each adapter must re-implement the methods of the disruptor that it wraps.
Following the example above, the adapters for
PodDisruptor
andServiceDisruptor
must both implement the methodInjectHTTPFault
. This duplication will increase as more fault types and disruptors are added. For example, it is to be expected that both thePodDisruptor
and a futureNodeDisruptor
implements anInjectNetworkFaults
method for injecting network-level faults.The text was updated successfully, but these errors were encountered: