FaultInjectionGrainStorage
class
Namespace: Orleans.TestingHost
Fault injection decorator for storage providers. This allows users to inject storage exceptions to test error handling scenarios.
public class FaultInjectionGrainStorage : ILifecycleParticipant<ISiloLifecycle>, IGrainStorageConstructors
FaultInjectionGrainStorage(IGrainStorage, string, ILoggerFactory, IGrainFactory, FaultInjectionGrainStorageOptions)Default constructor which creates the decorated storage provider.
Methods
ClearStateAsync(string, GrainId, IGrainState<T>)Faults if exception is provided, otherwise calls through to decorated storage provider.Participate(ISiloLifecycle)Adds the provided observer as a participant in the lifecycle.ReadStateAsync(string, GrainId, IGrainState<T>)Faults if exception is provided, otherwise calls through to decorated storage provider.WriteStateAsync(string, GrainId, IGrainState<T>)Faults if exception is provided, otherwise calls through to decorated storage provider.
