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

[Cosmos] migrate from using unittest #32076

Merged
merged 60 commits into from
Oct 17, 2023
Merged

Conversation

simorenoh
Copy link
Member

@simorenoh simorenoh commented Sep 13, 2023

It seems as though our Cosmos async client tests are actually not running in the pipelines:
image
image

This is due to the fact that using the unit test package does not support async, and as such we have been missing coverage for a while. Most other SDKs are actually not even using unit test anymore since the new test proxy does not use it, so moving away from it in general should be the move. This PR takes care of migrating all of our existing tests to use the default pytest package, which should allow our pipelines to run async tests. This PR also fixes some tests.

I'll also be renaming the tests to have an async suffix at the end since otherwise it makes the debugging a bit rougher (from images above, you wouldn't know which is which if the time was the same.)

EDIT: This is what the pipeline looks like now, with both renaming and async tests actually running:
image

using this one as the test file
@simorenoh
Copy link
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-sdk
Copy link
Collaborator

azure-sdk commented Sep 13, 2023

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-cosmos

@simorenoh
Copy link
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simorenoh
Copy link
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simorenoh
Copy link
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simorenoh
Copy link
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simorenoh
Copy link
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simorenoh
Copy link
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simorenoh
Copy link
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simorenoh
Copy link
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simorenoh
Copy link
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simorenoh
Copy link
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simorenoh
Copy link
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simorenoh simorenoh marked this pull request as ready for review October 2, 2023 20:49
Copy link
Member

@bambriz bambriz left a comment

Choose a reason for hiding this comment

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

LGTM

@simorenoh
Copy link
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simorenoh
Copy link
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simorenoh
Copy link
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@kushagraThapar kushagraThapar left a comment

Choose a reason for hiding this comment

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

Requesting change on the changelog update, others are just nit comments and are not blockers, thanks @simorenoh

sdk/cosmos/azure-cosmos/CHANGELOG.md Outdated Show resolved Hide resolved
sdk/cosmos/azure-cosmos/dev_requirements.txt Show resolved Hide resolved
@simorenoh simorenoh merged commit e1df91b into Azure:main Oct 17, 2023
@simorenoh simorenoh deleted the update-tests branch October 17, 2023 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants