public void CloudBlobContainerSetMetadataAPMCancel() { CloudBlobContainer container = GetRandomContainerReference(); try { container.Create(); container.Metadata.Add("key1", "value1"); TestHelper.ExecuteAPMMethodWithCancellation(4000, new[] { DelayBehaviors.DelayAllRequestsIf(4000 * 3, AzureStorageSelectors.BlobTraffic().IfHostNameContains(container.ServiceClient.Credentials.AccountName)) }, (options, opContext, callback, state) => container.BeginSetMetadata(null, (BlobRequestOptions)options, opContext, callback, state), container.EndSetMetadata); } finally { container.DeleteIfExists(); } }