Skip to content

Commit

Permalink
fix stress tests. (#29845)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasobol-msft committed Jul 7, 2022
1 parent 205afd5 commit 5bb7acd
Showing 1 changed file with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,16 @@
package com.azure.storage.blob.perf.core;

import com.azure.storage.blob.perf.BlobPerfStressOptions;
import reactor.core.publisher.Mono;

import java.util.UUID;

import static com.azure.perf.test.core.TestDataCreationHelper.createRandomByteBufferFlux;

public abstract class AbstractUploadTest<TOptions extends BlobPerfStressOptions> extends BlobTestBase<TOptions> {

/**
* This ctor makes sure that each upload tests targets different blob.
* @param options options
*/
public AbstractUploadTest(TOptions options) {
super(options, BLOB_NAME_PREFIX + UUID.randomUUID());
}

@Override
public Mono<Void> setupAsync() {
// Upload one blob per test
return super.setupAsync()
.then(blobAsyncClient.upload(createRandomByteBufferFlux(options.getSize()), null))
.then();
}
}

0 comments on commit 5bb7acd

Please sign in to comment.