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

Default timeouts are set to zero, instead of 30 seconds #16

Open
vl-lapikov opened this issue Aug 5, 2020 · 2 comments
Open

Default timeouts are set to zero, instead of 30 seconds #16

vl-lapikov opened this issue Aug 5, 2020 · 2 comments

Comments

@vl-lapikov
Copy link

Hey Guys,

Here https://codeception.com/docs/modules/WebDriver Codeception claims, that default timeouts (connection_timeout and request_timeout) are 30 seconds. Because of the bug, I think they are set to 0 now, which makes curl_exec() later to wait indefinitely.

Check this code https://github.com/Codeception/module-webdriver/blob/master/src/Codeception/Module/WebDriver.php#L362

$this->connectionTimeoutInMs = $this->config['connection_timeout'] * 1000;
$this->requestTimeoutInMs = $this->config['request_timeout'] * 1000;

by default both values are null, but multipling null * 1000 results in 0, not null. Later here https://github.com/php-webdriver/php-webdriver/blob/main/lib/Remote/RemoteWebDriver.php#L101 it is strictly compared with null, but since the value is 0 it passes the condition and sets timeout to 0 which makes curl to wait indefinitely.

@SamMousa
Copy link
Contributor

SamMousa commented Aug 6, 2020

I think you are right. Can you make a test and a fix?

@vl-lapikov
Copy link
Author

Yeah, I'll work on it.

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

No branches or pull requests

2 participants