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

[Identity] Adjust tests to reduce flakiness #38712

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

pvaneck
Copy link
Member

@pvaneck pvaneck commented Nov 26, 2024

Some of the managed identity unit tests rely on time.time(), and this can cause some assertions to be off by one, causing flakiness in tests. This adds some leeway to the comparison.

Example error:

E           AssertionError: assert 43 == 42
E            +  where 43 = AccessTokenInfo(token='****', expires_on=43, token_type='Bearer', refresh_on=None).expires_on

Unverified

The signing certificate or its chain could not be verified.
Some of the managed identity unit tests rely on time.time(), and this
can cause some assertions to be off by one, causing flakiness in tests.
This adds some leeway to the comparison.

Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@pvaneck pvaneck marked this pull request as ready for review December 3, 2024 20:37
@pvaneck pvaneck requested review from xiangyan99 and a team as code owners December 3, 2024 20:37
@pvaneck pvaneck merged commit 4567dbf into Azure:main Dec 3, 2024
38 checks passed
@pvaneck pvaneck deleted the identity-exp-flaky-tests branch December 3, 2024 23:40
l0lawrence pushed a commit to l0lawrence/azure-sdk-for-python that referenced this pull request Feb 19, 2025

Unverified

The signing certificate or its chain could not be verified.
Some of the managed identity unit tests rely on time.time(), and this
can cause some assertions to be off by one, causing flakiness in tests.
This adds some leeway to the comparison.

Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants