diff --git a/sdk/test-utils/testing-recorder-new/test/core-v1-test.spec.ts b/sdk/test-utils/testing-recorder-new/test/core-v1-test.spec.ts index d3c52b0726bb..1497ca4c8f6d 100644 --- a/sdk/test-utils/testing-recorder-new/test/core-v1-test.spec.ts +++ b/sdk/test-utils/testing-recorder-new/test/core-v1-test.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { isLiveMode, env } from "@azure/test-utils-recorder"; +import { env } from "@azure/test-utils-recorder"; import { QueueServiceClient, StoragePipelineOptions } from "@azure/storage-queue"; import { TestProxyHttpClientCoreV1 } from "@azure/test-utils-recorder-new"; import { config } from "dotenv"; @@ -13,14 +13,10 @@ describe("Tests", () => { const file = (isNode ? "node_" : "browser_") + `core_v1_file_path.json`; const recorder = new TestProxyHttpClientCoreV1(file); const options: StoragePipelineOptions = {}; - if (!isLiveMode()) { - options.httpClient = recorder; - } + options.httpClient = recorder; const client = new QueueServiceClient(env.STORAGE_SAS_URL, undefined, options); - if (!isLiveMode()) await recorder.start(); - + await recorder.start(); await client.createQueue((isNode ? "node-" : "browser-") + "1320"); - - if (!isLiveMode()) await recorder.stop(); + await recorder.stop(); }); }); diff --git a/sdk/test-utils/testing-recorder-new/test/core-v2-test.spec.ts b/sdk/test-utils/testing-recorder-new/test/core-v2-test.spec.ts index 3a465b42759a..f7d87a98dfaa 100644 --- a/sdk/test-utils/testing-recorder-new/test/core-v2-test.spec.ts +++ b/sdk/test-utils/testing-recorder-new/test/core-v2-test.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { isLiveMode, env } from "@azure/test-utils-recorder"; +import { env } from "@azure/test-utils-recorder"; import { TableEntity, TableClient } from "@azure/data-tables"; import { TestProxyHttpClient, recorderHttpPolicy } from "@azure/test-utils-recorder-new"; import { config } from "dotenv"; @@ -14,14 +14,12 @@ describe("Tests", () => { const file = (isNode ? "node_" : "browser_") + `core_v2_file_path.json`; const recorder = new TestProxyHttpClient(file); const client = TableClient.fromConnectionString(env.TABLES_SAS_CONNECTION_STRING, "newtable"); - if (!isLiveMode()) { - client.pipeline.addPolicy(recorderHttpPolicy(recorder)); - } - if (!isLiveMode()) await recorder.start(); + client.pipeline.addPolicy(recorderHttpPolicy(recorder)); + await recorder.start(); await client.createTable(); const simpleEntity: TableEntity = createSimpleEntity(); await client.createEntity(simpleEntity); await client.deleteTable(); - if (!isLiveMode()) await recorder.stop(); + await recorder.stop(); }); });