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

feat: Override selenium default command timeout #818

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

Dor-bl
Copy link
Collaborator

@Dor-bl Dor-bl commented Aug 17, 2024

List of changes

Override and increase the default HTTP requests command timeout from 1 minute to 10 minutes.

Types of changes

What types of changes are you proposing/introducing to the .NET client?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change that adds functionality or value)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)

Documentation

  • Have you proposed a file change/ PR with appium to update documentation?

This can be done by navigating to the documentation section on http://appium.io selecting the appropriate command/endpoint and clicking the 'Edit this doc' link to update the C# example

Integration tests

  • Have you provided integration tests for your changes? (required for Bugfix or New feature)

Details

Please provide more details about changes if necessary. You can provide code samples showing how they work and possible use cases if there are new features. Also, you can create gists with pasted C# code samples or put them here using markdown.
About markdown please read Mastering markdown and Writing on GitHub

@asos-LaoluTairuAkinsola
Copy link

asos-LaoluTairuAkinsola commented Aug 17, 2024

@Dor-bl ten minutes seems crazy. Is that in-line with the other clients?

@mykola-mokhnach
Copy link

mykola-mokhnach commented Aug 17, 2024

@Dor-bl ten minutes seems crazy. Is that in-line with the other clients?

Yes it is. Sometimes the startup phase for mobile sessions can take quite lot of time. For example, to boot an iOS simulator on a slow CI node.

@mykola-mokhnach
Copy link

Also, the server and drivers usually limit command timings as well, for example via newCommandTimeout, proxy timeout, etc, which means killing the client connection due to read timeout must be used as a last resort. In most of cases such timeout would mean a bug or a missing timeout handler at the server side.

@KazuCocoa
Copy link
Member

I wondered if it would be nice to have a troubleshooting and add this time thing in our test code as an example rather than overriding the existing one in selenium to avoid unexpected modification in the parent (selenium) side. Just a personal preference.

@Dor-bl
Copy link
Collaborator Author

Dor-bl commented Aug 18, 2024

I wondered if it would be nice to have a troubleshooting and add this time thing in our test code as an example rather than overriding the existing one in selenium to avoid unexpected modification in the parent (selenium) side. Just a personal preference.

You mean part of the Wiki? Because I don't think most users look in the test code.

@KazuCocoa
Copy link
Member

Yea, this is not strong opinion for the default value itself though.

When we override the value, probably it would be nice to address it in somewhere as well, docstring or wiki? in this dotnet client case. How to modify the timeout in Wiki also should help (as a general documentation thing)

Btw, the commit prefix could be feat. I saw some users had error handling for client side read timeout as well (real devices) to fail fast, so modifying the default value as a patch could change their behavior.

@Dor-bl Dor-bl changed the title chore: Override selenium default command timeout feat: Override selenium default command timeout Aug 18, 2024
@Dor-bl
Copy link
Collaborator Author

Dor-bl commented Aug 18, 2024

Yea, this is not strong opinion for the default value itself though.

When we override the value, probably it would be nice to address it in somewhere as well, docstring or wiki? in this dotnet client case. How to modify the timeout in Wiki also should help (as a general documentation thing)

Btw, the commit prefix could be feat. I saw some users had error handling for client side read timeout as well (real devices) to fail fast, so modifying the default value as a patch could change their behavior.

@KazuCocoa, Let me know what you think.
https://github.com/appium/dotnet-client/wiki/Troubleshooting#defaultcommandtimeout-field
@mykola-mokhnach, we need to decide if we stay with the Wiki for now and abandon this PR.

@mykola-mokhnach
Copy link

we need to decide if we stay with the Wiki for now and abandon this PR.

I don't want to abandon anything. The change makes sense and does fix potential user issues

Copy link
Member

@KazuCocoa KazuCocoa left a comment

Choose a reason for hiding this comment

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

Thank you!

@Dor-bl Dor-bl merged commit 11ad486 into appium:main Aug 29, 2024
3 checks passed
@Dor-bl Dor-bl deleted the increase_requests_timeout branch August 29, 2024 18:26
@KazuCocoa KazuCocoa added the size:S contribution size: S label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement size:S contribution size: S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants