Skip to content

Commit

Permalink
[App Config] Skip live testing for byPage to avoid throttling in the …
Browse files Browse the repository at this point in the history
…CI (#16925)

* skip the test in live mode

* more description

* rushx lint fix

* rushx format
  • Loading branch information
HarshaNalluru authored Aug 20, 2021
1 parent 0f2fef6 commit b7e4ab8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions sdk/appconfiguration/app-configuration/test/public/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
startRecorder
} from "./utils/testHelpers";
import { AppConfigurationClient, ConfigurationSetting, ConfigurationSettingParam } from "../../src";
import { Recorder, delay } from "@azure/test-utils-recorder";
import { Recorder, delay, isLiveMode } from "@azure/test-utils-recorder";
import { Context } from "mocha";

describe("AppConfigurationClient", () => {
Expand Down Expand Up @@ -723,7 +723,15 @@ describe("AppConfigurationClient", () => {
assert.ok(foundMyExactSettingToo);
});

it("list with multiple pages", async () => {
it("list with multiple pages", async function() {
// This occasionally hits 429 error (throttling) since we are making 100s of requests in the test to create, get and delete keys.
// To avoid hitting the service with too many requests, skipping the test in live.
// More details at https://github.com/Azure/azure-sdk-for-js/issues/16743
//
// Remove the following line if you want to hit the live service.
// eslint-disable-next-line @typescript-eslint/no-invalid-this
if (isLiveMode()) this.skip();

const key = recorder.getUniqueName("listMultiplePagesOfResults");

// this number is arbitrarily chosen to match the size of a page + 1
Expand Down

0 comments on commit b7e4ab8

Please sign in to comment.