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

[Search] Refactor tests #29595

Merged
merged 4 commits into from May 20, 2024
Merged

[Search] Refactor tests #29595

merged 4 commits into from May 20, 2024

Conversation

dgetu
Copy link
Member

@dgetu dgetu commented May 7, 2024

Packages impacted by this PR

@azure/search-documents

Describe the problem that is addressed by this PR

A small refactor of tests to support 2024-05 test cases

Designed to be reviewed on a per-commit basis.

Depends on #29600

Command used to generate this PR:**(Applicable only to SDK release request PRs)

Checklists

  • Added impacted package name to the issue description

@github-actions github-actions bot added the Search label May 7, 2024
@dgetu dgetu force-pushed the search/refactor-tests branch 5 times, most recently from b5007b7 to b27eb9c Compare May 7, 2024 06:25
@dgetu dgetu marked this pull request as ready for review May 7, 2024 07:03
@dgetu dgetu requested a review from a team as a code owner May 7, 2024 07:03
@dgetu dgetu force-pushed the search/refactor-tests branch 2 times, most recently from 343602a to cc2ced3 Compare May 7, 2024 09:37
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@dgetu dgetu force-pushed the search/refactor-tests branch 6 times, most recently from 564fd36 to 9ba86c7 Compare May 9, 2024 23:16
Copy link
Member

@maorleger maorleger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits - I trust your judgement on whether you want to take them in or not - otherwise :shipit:

} from "../../../src";
import { delay } from "../../../src/serviceUtils";
import { COMPRESSION_DISABLED } from "../../compressionDisabled";
import { Hotel } from "./interfaces";

export const WAIT_TIME = isPlaybackMode() ? 0 : 4000;

function uniqueNameGenerator() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would a uuid from @azure/core-util work here instead? Meaning deleting this helper and just using uuids for unique names

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like for these names to be human-readable and deterministic. Maybe we can leverage a hash function instead?

assert.equal(correctServiceVersion, client.apiVersion);
});

it("prioritizes `serviceVersion` over `apiVersion", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a common miss when deprecating a field for another field (wha thappens if I pass both) - glad you're thinking and testing this!

@dgetu dgetu enabled auto-merge (squash) May 16, 2024 18:43
@dgetu
Copy link
Member Author

dgetu commented May 20, 2024

/check-enforcer override

@dgetu dgetu merged commit 6740f43 into Azure:main May 20, 2024
9 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants