Repository navigation
Conversation
The flutter_element_wait_timeout and flutter_server_launch_timeout getters are annotated and documented to return a timedelta, and their setters accept one, but the getters returned the raw capability value in milliseconds. So setting timedelta(seconds=10) and reading it back gave 10000. Convert the stored milliseconds to a timedelta, like the other timeout options do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K6zVKi1DtwmmBpy16MQyfY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
FlutterOptions.flutter_element_wait_timeoutandFlutterOptions.flutter_server_launch_timeoutare annotated-> timedelta | None, and their docstrings say they return atimedelta. Their setters accept atimedeltaand store it as milliseconds. The getters, however, returned the raw capability value:Every other millisecond timeout option, such as
adb_exec_timeoutandwda_launch_timeout, converts the stored value back to atimedelta.Fix
Return
timedelta(milliseconds=value)from both getters, orNonewhen the capability is not set, matching the other timeout options. What gets sent to the server does not change.Tests
timedeltaand the other as an int, reads both back astimedelta, and checks that the capabilities sent are still in milliseconds. It fails without the fix withassert 10000 == datetime.timedelta(seconds=10).ruff check,ruff format --check,mypy appiumand the full unit test suite pass.🤖 Generated with Claude Code