private Task StartChaosAsync( StartChaosDescription startChaosDescription, TimeSpan timeout, CancellationToken cancellationToken) { return(this.service.StartChaosAsync( startChaosDescription, timeout, cancellationToken)); }
public NativeCommon.IFabricAsyncOperationContext BeginStartChaos( IntPtr startChaosDescription, uint timeoutMilliseconds, NativeCommon.IFabricAsyncOperationCallback callback) { var managedStartChaosDescription = StartChaosDescription.CreateFromNative(startChaosDescription); TimeSpan managedTimeout = TimeSpan.FromMilliseconds(timeoutMilliseconds); return(Utility.WrapNativeAsyncMethodImplementation( (cancellationToken) => this.StartChaosAsync( managedStartChaosDescription, managedTimeout, cancellationToken), callback, "FaultAnalysisServiceBroker.StartChaosAsync", ThreadErrorMessageSetter)); }
public async Task StartChaosAsync( StartChaosDescription startChaosDescription, TimeSpan timeout, CancellationToken cancellationToken) { this.ThrowIfNotReady(() => this.ChaosMessageProcessor != null); try { await this.ChaosMessageProcessor.ProcessStartChaosAsync( startChaosDescription.ChaosParameters, cancellationToken).ConfigureAwait(false); } catch (Exception e) { TestabilityTrace.TraceSource.WriteWarning(TraceType, "StartChaosAsync: Exception occurred: {0}", e.Message); FaultAnalysisServiceUtility.ThrowTransientExceptionIfRetryable(e); throw; } }