[Test Recorder] Fix an issue where not all browser requests are recorded (#10013)
We use an async function to add a recorded request to an array then save the array to files when recorder stops. However we did not wait for the async function to complete, which leads to recording missing requests. This issue only happens in the browser case. In Node it is done in synchronous way. This change makes recorder to wait until all the recorded requests are added before saving them. All the tests have been updated to await for `recorder.stop()`. Co-authored-by: Harsha Nalluru <sanallur@microsoft.com>
This commit is contained in:
Родитель
44a44ee5c3
Коммит
3157a3d2e8
|
@ -15,8 +15,8 @@ describe("Authentication", () => {
|
|||
credsAndEndpoint = getTokenAuthenticationCredential() || this.skip();
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("invalid connection string gives a decent error message", () => {
|
||||
|
|
|
@ -28,7 +28,7 @@ describe("etags", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await deleteKeyCompletely([key], client);
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// etag usage is 'opt-in' via the onlyIfChanged/onlyIfUnchanged options for certain calls
|
||||
|
|
|
@ -28,7 +28,7 @@ describe("AppConfigurationClient (set|clear)ReadOnly", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await deleteKeyCompletely([testConfigSetting.key], client);
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("basic", async function() {
|
||||
|
|
|
@ -24,8 +24,8 @@ describe("AppConfigurationClient", () => {
|
|||
client = createAppConfigurationClientForTests() || this.skip();
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
describe("simple usages", () => {
|
||||
|
|
|
@ -108,8 +108,8 @@ describe("http request related tests", function() {
|
|||
client = createAppConfigurationClientForTests() || this.skip();
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("custom client request ID", async () => {
|
||||
|
|
|
@ -22,8 +22,8 @@ describe("Various error cases", () => {
|
|||
client = createAppConfigurationClientForTests() || this.skip();
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
describe("throws", () => {
|
||||
|
|
|
@ -16,9 +16,9 @@ describe("FormRecognizerClient browser only", () => {
|
|||
({ recorder, client } = createRecordedRecognizerClient(this, apiKey));
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
afterEach(async function() {
|
||||
if (recorder) {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -33,9 +33,9 @@ describe("FormTrainingClient browser only", () => {
|
|||
);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
afterEach(async function() {
|
||||
if (recorder) {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -214,9 +214,9 @@ describe("FormRecognizerClient custom form recognition browser only", () => {
|
|||
({ recorder, client: recognizerClient } = createRecordedRecognizerClient(this, apiKey));
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
afterEach(async function() {
|
||||
if (recorder) {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
it("recognizes form url unlabeled model", async () => {
|
||||
|
|
|
@ -19,9 +19,9 @@ describe("FormRecognizerClient NodeJS only", () => {
|
|||
({ recorder, client } = createRecordedRecognizerClient(this, apiKey));
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
afterEach(async function() {
|
||||
if (recorder) {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -157,9 +157,9 @@ describe("[AAD] FormRecognizerClient NodeJS only", () => {
|
|||
({ recorder, client } = createRecordedRecognizerClient(this));
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
afterEach(async function() {
|
||||
if (recorder) {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -35,9 +35,9 @@ describe("FormTrainingClient NodeJS only", () => {
|
|||
({ recorder, client: trainingClient } = createRecordedTrainingClient(this, apiKey));
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
afterEach(async function() {
|
||||
if (recorder) {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -237,9 +237,9 @@ describe("FormRecognizerClient form recognition NodeJS", () => {
|
|||
({ recorder, client: recognizerClient } = createRecordedRecognizerClient(this, apiKey));
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
afterEach(async function() {
|
||||
if (recorder) {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -396,9 +396,9 @@ describe("[AAD] FormTrainingClient NodeJS only", () => {
|
|||
({ recorder, client: trainingClient } = createRecordedTrainingClient(this));
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
afterEach(async function() {
|
||||
if (recorder) {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ describe("Challenge based authentication tests", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -44,7 +44,7 @@ describe("Certificates client - create, read, update and delete", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -35,7 +35,7 @@ describe("Certificates client - list certificates in various ways", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -26,7 +26,7 @@ describe("Certificates client - LRO - create", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -26,7 +26,7 @@ describe("Certificates client - lro - delete", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -30,7 +30,7 @@ describe("Certificates client - LRO - certificate operation", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -27,7 +27,7 @@ describe("Certificates client - LRO - recoverDelete", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -36,7 +36,7 @@ describe("Certificates client - merge and import certificates", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -32,7 +32,7 @@ describe("Certificates client - restore certificates and recover backups", () =>
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -35,7 +35,7 @@ describe("Challenge based authentication tests", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -33,7 +33,7 @@ describe("Keys client - create, read, update and delete operations", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -45,7 +45,7 @@ describe("CryptographyClient (all decrypts happen remotely)", () => {
|
|||
afterEach(async function() {
|
||||
if (!this.currentTest?.isPending()) {
|
||||
await testClient.flushKey(keyName);
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ describe("Keys client - import keys", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -26,7 +26,7 @@ describe("Keys client - list keys in various ways", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -26,7 +26,7 @@ describe("Keys client - Long Running Operations - delete", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -27,7 +27,7 @@ describe("Keys client - Long Running Operations - recoverDelete", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -27,7 +27,7 @@ describe("Keys client - restore keys and recover backups", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -35,7 +35,7 @@ describe("Challenge based authentication tests", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -28,7 +28,7 @@ describe("Secret client - create, read, update and delete operations", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -30,7 +30,7 @@ describe("Secret client - list secrets in various ways", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -27,7 +27,7 @@ describe("Secrets client - Long Running Operations - delete", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -27,7 +27,7 @@ describe("Secrets client - Long Running Operations - recoverDelete", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -27,7 +27,7 @@ describe("Secret client - restore secrets and recover backups", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// The tests follow
|
||||
|
|
|
@ -34,7 +34,7 @@ describe("SearchClient", function() {
|
|||
|
||||
afterEach(async function() {
|
||||
if (recorder) {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
if (!isPlaybackMode()) {
|
||||
await indexClient.deleteIndex(TEST_INDEX_NAME);
|
||||
|
|
|
@ -25,7 +25,7 @@ describe("BlobChangeFeedClient", async () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("next(): fetch all events", async () => {
|
||||
|
@ -129,7 +129,7 @@ describe("BlobChangeFeedClient: Change Feed not configured", async () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("should throw when fetching changes", async () => {
|
||||
|
|
|
@ -21,8 +21,8 @@ describe("Aborter", () => {
|
|||
containerClient = blobServiceClient.getContainerClient(containerName);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("Should abort after aborter timeout", async () => {
|
||||
|
|
|
@ -31,7 +31,7 @@ describe("AppendBlobClient", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("create with default parameters", async () => {
|
||||
|
|
|
@ -56,7 +56,7 @@ describe("BlobBatch", () => {
|
|||
afterEach(async function() {
|
||||
if (!this.currentTest?.isPending()) {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ describe("BlobClient", () => {
|
|||
afterEach(async function() {
|
||||
if (!this.currentTest?.isPending()) {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ describe("BlobClient beginCopyFromURL Poller", () => {
|
|||
if (!this.currentTest?.isPending()) {
|
||||
await containerClient.delete();
|
||||
await destinationContainerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ describe("BlobServiceClient", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("ListContainers with default parameters", async () => {
|
||||
|
|
|
@ -43,7 +43,7 @@ describe("Blob versioning", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("List Blobs include versions", async () => {
|
||||
|
|
|
@ -37,7 +37,7 @@ describe("BlockBlobClient", () => {
|
|||
afterEach(async function() {
|
||||
if (!this.currentTest?.isPending()) {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ describe("Highlevel", () => {
|
|||
afterEach(async function() {
|
||||
if (!this.currentTest?.isPending()) {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -51,7 +51,7 @@ describe("Highlevel", () => {
|
|||
recorder = record(this, recorderEnvSetup);
|
||||
tempFile1 = getBrowserFile(recorder.getUniqueName("browserfile"), tempFile1Length);
|
||||
tempFile2 = getBrowserFile(recorder.getUniqueName("browserfile2"), tempFile2Length);
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
after(async () => {});
|
||||
|
|
|
@ -36,7 +36,7 @@ describe("ContainerClient", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("setMetadata", async () => {
|
||||
|
|
|
@ -50,7 +50,7 @@ describe("Encryption Scope", function() {
|
|||
if (containerClient) {
|
||||
await containerClient.delete();
|
||||
}
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("create container", async () => {
|
||||
|
|
|
@ -23,7 +23,7 @@ describe("LeaseClient from Container", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("acquireLease", async () => {
|
||||
|
@ -161,7 +161,7 @@ describe("LeaseClient from Blob", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("acquireLease", async () => {
|
||||
|
|
|
@ -43,7 +43,7 @@ describe("AppendBlobClient Node.js only", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("can be created with a url and a credential", async () => {
|
||||
|
|
|
@ -55,7 +55,7 @@ describe("BlobClient Node.js only", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("download with with default parameters", async () => {
|
||||
|
|
|
@ -14,7 +14,7 @@ describe("BlobServiceClient Node.js only", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("can be created with a url and a credential", async () => {
|
||||
|
|
|
@ -42,7 +42,7 @@ describe("BlockBlobClient Node.js only", () => {
|
|||
afterEach(async function() {
|
||||
if (!this.currentTest?.isPending()) {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ describe("ContainerClient Node.js only", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("getAccessPolicy", async () => {
|
||||
|
|
|
@ -43,7 +43,7 @@ describe("Highlevel", () => {
|
|||
afterEach(async function() {
|
||||
if (!this.currentTest?.isPending()) {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -56,14 +56,14 @@ describe("Highlevel", () => {
|
|||
tempFileLargeLength = 257 * 1024 * 1024;
|
||||
tempFileSmall = await createRandomLocalFile(tempFolderPath, 15, 1024 * 1024);
|
||||
tempFileSmallLength = 15 * 1024 * 1024;
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
after(async function() {
|
||||
recorder = record(this, recorderEnvSetup);
|
||||
fs.unlinkSync(tempFileLarge);
|
||||
fs.unlinkSync(tempFileSmall);
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("put blob with maximum size", async () => {
|
||||
|
|
|
@ -44,7 +44,7 @@ describe("PageBlobClient Node.js only", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("startCopyIncremental", async () => {
|
||||
|
|
|
@ -31,8 +31,8 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => {
|
|||
blobServiceClient = getBSU();
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("generateAccountSASQueryParameters should work", async () => {
|
||||
|
|
|
@ -40,7 +40,7 @@ describe("PageBlobClient", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("create with default parameters", async () => {
|
||||
|
|
|
@ -28,7 +28,7 @@ describe("RetryPolicy", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("Retry Policy should work when first request fails with 500", async () => {
|
||||
|
|
|
@ -24,7 +24,7 @@ describe("Special Naming Tests", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await containerClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("Should work with special container and blob names with spaces", async () => {
|
||||
|
|
|
@ -21,8 +21,8 @@ describe("Aborter", () => {
|
|||
fileSystemClient = serviceClient.getFileSystemClient(fileSystemName);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("Should abort after aborter timeout", async () => {
|
||||
|
|
|
@ -40,7 +40,7 @@ describe("Highlevel browser only", () => {
|
|||
afterEach(async function() {
|
||||
if (!this.currentTest?.isPending()) {
|
||||
await fileSystemClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -48,7 +48,7 @@ describe("Highlevel browser only", () => {
|
|||
recorder = record(this, recorderEnvSetup);
|
||||
tempFileLarge = getBrowserFile(recorder.getUniqueName("browserfilesmall"), tempFileLargeLength);
|
||||
tempFileSmall = getBrowserFile(recorder.getUniqueName("browserfilelarge"), tempFileSmallLength);
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
after(async () => {});
|
||||
|
|
|
@ -30,7 +30,7 @@ describe("DataLakeFileSystemClient", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await fileSystemClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("setMetadata", async () => {
|
||||
|
|
|
@ -23,7 +23,7 @@ describe("LeaseClient from FileSystem", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await fileSystemClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("acquireLease", async () => {
|
||||
|
@ -158,7 +158,7 @@ describe("LeaseClient from File", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await fileSystemClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("acquireLease", async () => {
|
||||
|
@ -281,7 +281,7 @@ describe("LeaseClient from Directory", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await fileSystemClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("acquireLease", async () => {
|
||||
|
|
|
@ -27,7 +27,7 @@ describe("DataLakeFileSystemClient Node.js only", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await fileSystemClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("getAccessPolicy", async () => {
|
||||
|
|
|
@ -36,7 +36,7 @@ describe("Highlevel Node.js only", () => {
|
|||
|
||||
let recorder: any;
|
||||
|
||||
beforeEach(async function () {
|
||||
beforeEach(async function() {
|
||||
recorder = record(this, recorderEnvSetup);
|
||||
const serviceClient = getDataLakeServiceClient();
|
||||
fileSystemName = recorder.getUniqueName("filesystem");
|
||||
|
@ -46,14 +46,14 @@ describe("Highlevel Node.js only", () => {
|
|||
fileClient = fileSystemClient.getFileClient(fileName);
|
||||
});
|
||||
|
||||
afterEach(async function () {
|
||||
afterEach(async function() {
|
||||
if (!this.currentTest?.isPending()) {
|
||||
await fileSystemClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
before(async function () {
|
||||
before(async function() {
|
||||
recorder = record(this, recorderEnvSetup);
|
||||
if (!fs.existsSync(tempFolderPath)) {
|
||||
fs.mkdirSync(tempFolderPath);
|
||||
|
@ -63,14 +63,14 @@ describe("Highlevel Node.js only", () => {
|
|||
tempFileSmall = await createRandomLocalFile(tempFolderPath, 15, MB);
|
||||
tempFileSmallLength = 15 * MB;
|
||||
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
after(async function () {
|
||||
after(async function() {
|
||||
recorder = record(this, recorderEnvSetup);
|
||||
fs.unlinkSync(tempFileLarge);
|
||||
fs.unlinkSync(tempFileSmall);
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("upload should work for large data", async () => {
|
||||
|
|
|
@ -38,7 +38,7 @@ describe("DataLakePathClient Node.js only", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await fileSystemClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("setAccessControl", async () => {
|
||||
|
|
|
@ -32,8 +32,8 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => {
|
|||
serviceClient = getDataLakeServiceClient();
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("generateAccountSASQueryParameters should work", async () => {
|
||||
|
|
|
@ -35,7 +35,7 @@ describe("DataLakePathClient", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await fileSystemClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("read with with default parameters", async () => {
|
||||
|
|
|
@ -27,7 +27,7 @@ describe("RetryPolicy", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await dataLakeFileSystemClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("Retry Policy should work when first request fails with 500", async () => {
|
||||
|
|
|
@ -15,7 +15,7 @@ describe("DataLakeServiceClient", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("ListFileSystems with default parameters", async () => {
|
||||
|
|
|
@ -26,7 +26,7 @@ describe("Special Naming Tests", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await fileSystemClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("Should work with special container and blob names with spaces", async () => {
|
||||
|
|
|
@ -36,8 +36,8 @@ describe("Utility Helpers", () => {
|
|||
recorder = record(this, recorderEnvSetup);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("sanitizeURL redacts SAS token", () => {
|
||||
|
|
|
@ -21,8 +21,8 @@ describe("Aborter", () => {
|
|||
shareClient = serviceClient.getShareClient(shareName);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("Should abort after aborter timeout", async () => {
|
||||
|
|
|
@ -51,7 +51,7 @@ describe("DirectoryClient", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await shareClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("setMetadata", async () => {
|
||||
|
|
|
@ -61,7 +61,7 @@ describe("FileClient", () => {
|
|||
afterEach(async function() {
|
||||
if (!this.currentTest?.isPending()) {
|
||||
await shareClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ describe("FileServiceClient", () => {
|
|||
recorder = record(this, recorderEnvSetup);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("ListShares with default parameters", async () => {
|
||||
|
|
|
@ -48,7 +48,7 @@ describe("LeaseClient", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await shareClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
// lease management:
|
||||
|
|
|
@ -33,7 +33,7 @@ describe("DirectoryClient Node.js only", () => {
|
|||
afterEach(async function() {
|
||||
await dirClient.delete();
|
||||
await shareClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("can be created with a url and a credential", async () => {
|
||||
|
|
|
@ -49,7 +49,7 @@ describe("FileClient Node.js only", () => {
|
|||
afterEach(async function() {
|
||||
if (!this.currentTest?.isPending()) {
|
||||
await shareClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ describe("FileServiceClient Node.js only", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("can be created with a url and a credential", async () => {
|
||||
|
|
|
@ -43,7 +43,7 @@ describe("Highlevel Node.js only", () => {
|
|||
afterEach(async function() {
|
||||
if (!this.currentTest?.isPending()) {
|
||||
await shareClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -28,8 +28,8 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => {
|
|||
serviceClient = getBSU();
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("generateAccountSASQueryParameters should work", async () => {
|
||||
|
|
|
@ -19,7 +19,7 @@ describe("ShareClient Node.js only", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await shareClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("setAccessPolicy", async () => {
|
||||
|
|
|
@ -14,21 +14,21 @@ describe("StorageSharedKeyCredentialPolicy Node.js only", () => {
|
|||
shareName = recorder.getUniqueName("1share-with-dash");
|
||||
shareClient = serviceClient.getShareClient(shareName);
|
||||
await shareClient.create();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
after(async function() {
|
||||
recorder = record(this, recorderEnvSetup);
|
||||
await shareClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
beforeEach(function() {
|
||||
recorder = record(this, recorderEnvSetup);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("StorageSharedKeyCredentialPolicy should work with special share and file names with spaces", async () => {
|
||||
|
|
|
@ -37,7 +37,7 @@ describe("Utility Helpers Node.js only", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("extractConnectionStringParts throws error when passed an invalid protocol in the connection string", async () => {
|
||||
|
|
|
@ -25,7 +25,7 @@ describe("RetryPolicy", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await shareClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("Retry Policy should work when first request fails with 500", async () => {
|
||||
|
|
|
@ -22,7 +22,7 @@ describe("ShareClient", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await shareClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("setMetadata", async () => {
|
||||
|
|
|
@ -29,21 +29,21 @@ describe("Special Naming Tests", () => {
|
|||
await shareClient.create();
|
||||
await directoryClient.create();
|
||||
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
after(async function() {
|
||||
recorder = record(this, recorderEnvSetup);
|
||||
await shareClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
beforeEach(function() {
|
||||
recorder = record(this, recorderEnvSetup);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("Should work with special container and file names with spaces", async () => {
|
||||
|
|
|
@ -37,7 +37,7 @@ describe("Utility Helpers", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("sanitizeURL redacts SAS token", () => {
|
||||
|
|
|
@ -23,7 +23,7 @@ describe("Aborter", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("should not abort after calling abort()", async () => {
|
||||
|
|
|
@ -24,7 +24,7 @@ describe("QueueClient messageId methods", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await queueClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("update and delete empty message with default parameters", async () => {
|
||||
|
|
|
@ -23,7 +23,7 @@ describe("QueueClient messageId methods, Node.js only", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await queueClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("update message with 64KB characters including special char which is computed after encoding", async () => {
|
||||
|
|
|
@ -25,7 +25,7 @@ describe("QueueClient message methods, Node.js only", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await queueClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("enqueue, peek, dequeue with 64KB characters including special char which is computed after encoding", async () => {
|
||||
|
|
|
@ -22,7 +22,7 @@ describe("QueueClient Node.js only", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await queueClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("getAccessPolicy", async () => {
|
||||
|
|
|
@ -15,8 +15,8 @@ describe("QueueServiceClient Node.js only", () => {
|
|||
recorder = record(this, recorderEnvSetup);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("can be created with a url and a credential", async () => {
|
||||
|
|
|
@ -27,8 +27,8 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => {
|
|||
queueServiceClient = getQSU();
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("generateAccountSASQueryParameters should work", async () => {
|
||||
|
|
|
@ -37,7 +37,7 @@ describe("Utility Helpers Node.js only", () => {
|
|||
});
|
||||
|
||||
afterEach(async function() {
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("extractConnectionStringParts throws error when passed an invalid protocol in the connection string", async () => {
|
||||
|
|
|
@ -25,7 +25,7 @@ describe("QueueClient", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await queueClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("setMetadata", async () => {
|
||||
|
|
|
@ -24,7 +24,7 @@ describe("QueueClient message methods", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await queueClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("enqueue, peek, dequeue and clear message with default parameters", async () => {
|
||||
|
|
|
@ -13,8 +13,8 @@ describe("QueueServiceClient", () => {
|
|||
recorder = record(this, recorderEnvSetup);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
recorder.stop();
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("listQueues with default parameters", async () => {
|
||||
|
|
|
@ -28,7 +28,7 @@ describe("RetryPolicy", () => {
|
|||
|
||||
afterEach(async function() {
|
||||
await queueClient.delete();
|
||||
recorder.stop();
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
it("Retry policy should work when first request fails with 500", async () => {
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче