[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:
Jeremy Meng 2020-07-13 11:22:32 -07:00 коммит произвёл GitHub
Родитель 44a44ee5c3
Коммит 3157a3d2e8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
108 изменённых файлов: 171 добавлений и 165 удалений

Просмотреть файл

@ -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 () => {

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше