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 flaky test under Python 3.12. #257

Merged
merged 1 commit into from
Jan 16, 2025
Merged

Fix flaky test under Python 3.12. #257

merged 1 commit into from
Jan 16, 2025

Conversation

copybara-service[bot]
Copy link

Fix flaky test under Python 3.12.

The functionality to enable networking (i.e. turn off airplane mode and turn on
wifi) is done asynchronously within A11yGrpcWrapper._fetch_task_extras().
Under some conditions, repeated calls could interfere with each other before
the concurrent.futures.Future was reset, and this caused one test case to
fail.

This change makes this 100% robust by moving the reset to the top of the
function to avoid having the reset trigger within the same call of
_fetch_task_extras().

The functionality to enable networking (i.e. turn off airplane mode and turn on
wifi) is done asynchronously within `A11yGrpcWrapper._fetch_task_extras()`.
Under some conditions, repeated calls could interfere with each other before
the `concurrent.futures.Future` was reset, and this caused one test case to
fail.

This change makes this 100% robust by moving the reset to the top of the
function to avoid having the reset trigger within the same call of
`_fetch_task_extras()`.

PiperOrigin-RevId: 716214824
@copybara-service copybara-service bot merged commit fa2f00c into main Jan 16, 2025
1 check passed
@copybara-service copybara-service bot deleted the test_715951508 branch January 16, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant