mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00

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.
33 lines
1.5 KiB
Gherkin
33 lines
1.5 KiB
Gherkin
@tool @tool_httpsreplace
|
|
Feature: View the httpsreplace report
|
|
In order to switch to https
|
|
As an admin
|
|
I need to be able to automatically replace http links
|
|
|
|
Background: Create some http links
|
|
# This is a slow running feature (more than the default 30 seconds on slow environments)
|
|
# so we are allowing up to 120 (factor = 4) seconds to the replacement to complete.
|
|
Given I mark this test as slow setting a timeout factor of 4
|
|
|
|
And I am on site homepage
|
|
And the following "courses" exist:
|
|
| fullname | shortname | category | summary |
|
|
| Course 1 | C1 | 0 | <img src="http://intentionally.unavailable/test.png"> <img src="http://download.moodle.org/unittest/test.jpg"> |
|
|
And I log in as "admin"
|
|
|
|
@javascript
|
|
Scenario: Go to the HTTPS replace report screen. Make sure broken domains are reported.
|
|
When I navigate to "Security > HTTP security" in site administration
|
|
And I follow "HTTPS conversion tool"
|
|
And I press "Continue"
|
|
Then I should see "intentionally.unavailable"
|
|
|
|
@javascript
|
|
Scenario: Use the find and replace tool.
|
|
When I navigate to "Security > HTTP security" in site administration
|
|
And I follow "HTTPS conversion tool"
|
|
And I press "Continue"
|
|
And I set the field "I understand the risks of this operation" to "1"
|
|
And I press "Perform conversion"
|
|
Then I should see "intentionally.unavailable"
|
|
And I should see "download.moodle.org"
|