Skip to content

Conversation

@copybara-service
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