MDL-75223 tool_httpsreplace: Increase allowed timeout
commit6b3e6558919f6448e481871238a1d9e9bd83e072
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 31 Aug 2022 17:14:10 +0000 (31 19:14 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 2 Sep 2022 12:44:58 +0000 (2 14:44 +0200)
treefa1e04f031ac7cadc460fdad8223abceaa62d5ec
parenta7514f231ddfc3d1a1fdc32851fe535b9cc9b63c
MDL-75223 tool_httpsreplace: Increase allowed timeout

Oracle 21 performs worse than previous versions and this
is causing some tool_httpsreplace jobs to, near consistently,
fail with timeouts.

This can be workaround in a number of ways:

1) Hacking tool_httpsreplace to detect when it's running a
   behat test and avoid running it completely. We did something
   like that for tool_customlang in the past. Ugly exception.
2) For Oracle jobs, set BEHAT_INCREASE_TIMEOUT to 2 or higher, that
   will allow the whole behat run to have more time. Maybe too much
   if only the tool_httpsreplace scenarios are affected. And requires
   special configuration in sites running the tests.
3) Improve Oracle 21 performance. There are some remaining tests to
   perform to achieve that, but it's extremely slow process, so it
   won't happen soon.
4) Give more time to the failing tests using the step: "I mark this
   test as slow setting a timeout factor of X". It applies to all
   databases, but we are already using it, so no big problem. It's the
   same than solution 2) but from within the tests instead of affecting
   to the whole run.

From all the alternatives above, this patch implements 4), doubling
(from current 2 to 4), to give each test up to two minutes
(30 secs * 4 = 120 secs) with the new allowed timeout-factor.
admin/tool/httpsreplace/tests/behat/httpsreplace.feature