Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Simpletest doesn't have any timeout configured, so the default is chosen:
CURLOPT_FTP_RESPONSE_TIMEOUT: Indefinite
CURLOPT_TIMEOUT: Indefinite
CURLOPT_TIMEOUT_MS: Indefinite
CURLOPT_CONNECTTIMEOUT: 300 seconds
CURLOPT_CONNECTTIMEOUT_MS: Indefinite
CURLOPT_ACCEPTTIMEOUT_MS: 60 seconds
(source: https://stackoverflow.com/questions/10308915/php-default-curl-timeout-value)
In BTB we use the default guzzle configuration which is using, the default from Drupal: \Drupal\Core\Http\ClientFactory::fromOptions
, which is 30 seconds.
While this is not a problem in normal test running, it is a problem when you debug the site using xdebug.
Proposed resolution
Set the default value to infinite in BTB
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#12 | 2784159-12.patch | 823 bytes | alexpott |
#5 | 2784159-5.patch | 819 bytes | hchonov |
#2 | 2784159-2.patch | 605 bytes | dawehner |
|
Comments
Comment #2
dawehnerHere is some fix for that
Comment #4
klausiIf we rewrite the line we should not use \Drupal but $this->container instead.
And we should add a comment why we set the timeout to NULL.
Comment #5
hchonovRe-roll + addressing #4.
Comment #6
dawehnerGreat, thank you @hchonov!
Comment #7
alexpottSo
$this->container
is absolutely no different to using\Drupal
especially at this point in the test infra. And actually later on \Drupal access is better than $this->container because $this->container gets out-of-date in functional and functional javascript tests. Ideally we wouldn't be using the run-time container at all and test runners would have their own container that inject their own dependencies. But that is all for another issue - just pointing out the the change asked for in #4 is at best moot and in the long term is something we need to refactor either way.Committed c1a79b2 and pushed to 8.3.x. Thanks!
It didn't apply to 8.2.x otherwise I would have backported it since we should be able to debug that branch simply too.
Comment #9
mpdonadioCould this be causing the root cause 0 byte problem in #2828559: UpdatePathTestBase tests randomly failing?
Comment #10
hchonovThe problem existed in the referenced issue even before this one got in.
Comment #12
alexpottComment #13
Wim Leers#12 was posted by @alexpott for fixing #2844509: Random fails in BrowserTestBase tests with Operation timed out after 30001 milliseconds with 0 bytes.
Comment #15
catchCommitted/pushed to 8.2.x, thanks!
Comment #18
jibranCore patch for 8.2.5. Please ignore the comment and patch.