Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ci build #19766

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT license.

import { matrix } from "@azure/test-utils";
import { isLiveMode, env, record, Recorder } from "@azure-tools/test-recorder";
import { isLiveMode, isPlaybackMode, env, record, Recorder } from "@azure-tools/test-recorder";
import { CallingServerClient, GroupCallLocator, PlayAudioOptions, CallConnection } from "../../src";
import * as Constants from "./utils/constants";
import { TestUtils } from "./utils/testUtils";
Expand All @@ -18,6 +18,12 @@ matrix([[true, false]], async function(useAad) {
let connectionString: string;

beforeEach(async function(this: Context) {
// because we have only one test case here, "before each" will hook for the test.
// hence, need below block to disable beforeEach block.
if (isPlaybackMode()) {
// tslint:disable-next-line:no-invalid-this
this.skip();
}
recorder = record(this, environmentSetup);
recorder.skip(
undefined,
Expand All @@ -34,13 +40,19 @@ matrix([[true, false]], async function(useAad) {
});

afterEach(async function(this: Context) {
// because we have only one test case here, "after each" will hook for the test.
// hence, need below block to disable afterEach block.
if (isPlaybackMode()) {
// tslint:disable-next-line:no-invalid-this
this.skip();
}
await recorder.stop();
});

describe("CallingServerClient Live Test", function() {
it("Run basic scenario to test client creation", async function(this: Context) {
this.timeout(0);
const groupId = TestUtils.getGroupId("Run join_play_cancel_hangup scenario");
const groupId = TestUtils.getGroupId(`Run join_play_cancel_hangup scenario ${useAad ? " [AAD]" : ""}`);
const fromUser = await TestUtils.getUserId("fromUser", connectionString);
const toUser = await TestUtils.getUserId("toUser", connectionString);
const callingServer = new CallingServerClient(connectionString);
Expand Down