public override void Run(CancellationToken cancellationToken) { using var stream = RandomStream.Create(Options.Size); // No need to delete file in Cleanup(), since ContainerTest.GlobalCleanup() deletes the whole container _cloudBlockBlob.UploadFromStream(stream); }
public override async Task RunAsync(CancellationToken cancellationToken) { using var stream = RandomStream.Create(Options.Size); // No need to delete file in Cleanup(), since ContainerTest.GlobalCleanup() deletes the whole container await _cloudBlockBlob.UploadFromStreamAsync(stream, cancellationToken); }
public override async Task GlobalSetupAsync() { await base.GlobalSetupAsync(); using var stream = RandomStream.Create(Options.Size); await _blobClient.UploadAsync(stream, overwrite : true); }
public override async Task RunAsync(CancellationToken cancellationToken) { using var stream = RandomStream.Create(Options.Size); // No need to delete file in Cleanup(), since ContainerTest.GlobalCleanup() deletes the whole container await _blobClient.UploadAsync(stream, transferOptions : Options.StorageTransferOptions, cancellationToken : cancellationToken); }
/// <summary> /// Initializes a new instance of the <see cref="Upload"/> class. /// </summary> /// /// <param name="options">The set of options to consider for configuring the scenario.</param> /// public Upload(SizeOptions options) : base(options) { var serviceClient = new DataLakeServiceClient(TestEnvironment.DataLakeServiceUri, TestEnvironment.DataLakeCredential); FileSystemClient = serviceClient.GetFileSystemClient(FileSystemName); Payload = RandomStream.Create(Options.Size); }
public override async Task GlobalSetupAsync() { await base.GlobalSetupAsync(); using var stream = RandomStream.Create(Options.Size); // No need to delete file in GlobalCleanup(), since ContainerV11Test.GlobalCleanup() deletes the whole container await _cloudBlockBlob.UploadFromStreamAsync(stream); }
public override async Task GlobalSetupAsync() { await base.GlobalSetupAsync(); using Stream stream = RandomStream.Create(Options.Size); // No need to delete file in GlobalCleanup(), since ContainerTest.GlobalCleanup() deletes the whole container await _blobClient.UploadAsync(stream, overwrite : true); }
/// <summary> /// Performs the tasks needed to initialize and set up the environment for an instance /// of the test scenario. When multiple instances are run in parallel, setup will be /// run once for each prior to its execution. /// </summary> /// public async override Task SetupAsync() { await base.SetupAsync(); // Create the test file that will be used as the basis for uploading. using var randomStream = RandomStream.Create(1024); await FileClient.CreateIfNotExistsAsync(); await FileClient.UploadAsync(randomStream, true); }
public override async Task GlobalSetupAsync() { await base.GlobalSetupAsync(); _tempFile = Path.GetTempFileName(); using var randomStream = RandomStream.Create(Options.Size); using var fileStream = File.OpenWrite(_tempFile); await randomStream.CopyToAsync(fileStream); fileStream.Close(); }
/// <summary> /// Performs the tasks needed to initialize and set up the environment for an instance /// of the test scenario. When multiple instances are run in parallel, setup will be /// run once for each prior to its execution. /// </summary> /// public async override Task SetupAsync() { await base.SetupAsync(); UploadPath = Path.GetTempFileName(); using var uploadFile = File.OpenWrite(UploadPath); using var randomStream = RandomStream.Create(Options.Size); await randomStream.CopyToAsync(uploadFile); uploadFile.Close(); }
/// <summary> /// Performs the tasks needed to initialize and set up the environment for the test scenario. /// When multiple instances are run in parallel, the setup will take place once, prior to the /// execution of the first test instance. /// </summary> /// public async override Task GlobalSetupAsync() { await base.GlobalSetupAsync(); await FileSystemClient.CreateAsync(); // Create the test file that will be used for reading. using var randomStream = RandomStream.Create(Options.Size); await FileClient.CreateAsync(); await FileClient.UploadAsync(randomStream, true); }
public override void Run(CancellationToken cancellationToken) { using var stream = RandomStream.Create(Options.Size); BlockBlobClient.StageBlock(_blockId, stream); }
public override void Run(CancellationToken cancellationToken) { using var stream = RandomStream.Create(Options.Size); BlockBlobClient.Upload(stream, cancellationToken: cancellationToken); }
/// <summary> /// Initializes a new instance of the <see cref="UploadFile"/> class. /// </summary> /// <param name="options">The set of options to consider for configuring the scenario.</param> public UploadFile(SizeOptions options) : base(options) { _stream = RandomStream.Create(options.Size); }
public SendReceiveTest(SizeOptions options) : base(options) { _payload = BinaryData.FromStream(RandomStream.Create(options.Size)); }
/// <summary> /// Performs the tasks needed to initialize and set up the environment for an instance /// of the test scenario. When multiple instances are run in parallel, setup will be /// run once for each prior to its execution. /// </summary> /// public async override Task SetupAsync() { await base.SetupAsync(); Payload = RandomStream.Create(Options.Size); }
public override async Task RunAsync(CancellationToken cancellationToken) { using var stream = RandomStream.Create(Options.Size); await CloudBlockBlob.UploadFromStreamAsync(stream, cancellationToken); }
public override void Run(CancellationToken cancellationToken) { using var stream = RandomStream.Create(Options.Size); CloudBlockBlob.UploadFromStream(stream); }
public UploadBlob(StorageTransferOptionsOptions options) : base(options) { _stream = RandomStream.Create(options.Size); }
public override void Run(CancellationToken cancellationToken) { using var stream = RandomStream.Create(Options.Size); BlobClient.Upload(stream, transferOptions: Options.StorageTransferOptions, cancellationToken: cancellationToken); }
public override async Task RunAsync(CancellationToken cancellationToken) { using var stream = RandomStream.Create(Options.Size); await BlockBlobClient.StageBlockAsync(_blockId, stream); }
public override async Task RunAsync(CancellationToken cancellationToken) { using var stream = RandomStream.Create(Options.Size); await BlobClient.UploadAsync(stream, transferOptions : Options.StorageTransferOptions, cancellationToken : cancellationToken); }