Closed (fixed)
Project:
Drupal core
Version:
8.2.x-dev
Component:
simpletest.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Jun 2016 at 09:16 UTC
Updated:
14 Feb 2017 at 18:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
xjmThanks @martin107 for the report!
The fail result is at: https://www.drupal.org/pift-ci-job/339437
This also happened in HEAD recently for a different test: https://www.drupal.org/pift-ci-job/529116 In that case there was also a know failure due to #2806697: Random fail for AlreadyInstalledException.
Comment #4
xjmI also wonder if this might be the same bug as #2806697: Random fail for AlreadyInstalledException, just manifesting differently.
Comment #5
xjmMore instances:
https://www.drupal.org/pift-ci-job/447899
https://www.drupal.org/pift-ci-job/375643
https://www.drupal.org/pift-ci-job/294179
All early in the alphabet like #2806697: Random fail for AlreadyInstalledException seemed to be.
Comment #6
xjmComment #7
xjmComment #8
xjm@catch, @alexpott, @effulgentsia, @Cottser, and I agreed that this is critical as a random test failure under normal circumstances in HEAD.
Comment #9
alexpottSo this occurs because during the installer the temporary directory is not yet set to the test specific one. We need to move the setting of this to be inside the installer. Unfortunately there is no other way.
Here's another occurrence https://www.drupal.org/pift-ci-job/571518.
Comment #10
alexpottComment #12
alexpottoops should have read my own added documentation - the temp directory expected by the test system in not inside the public files directory but it is just up one level.
For example:
Comment #13
alexpottComment #14
MixologicI just found some older evidence that this has been around a long time : https://www.drupal.org/node/2656720#comment-10872502
Comment #15
berdirThis looks good to me, explanation makes sense. @dawehner agrees.
Comment #16
alexpottIn discussing with @xjm I realised that we can test that we're not writing an .htaccess to the system temp directory and that a .htaccess is present in the test specific directory.
Comment #17
alexpottHere's a patch with tests for both Simpletest and BrowserTestBase. Also on @xjm's suggestion I've improved the comments in \Drupal\Core\Test\FunctionalTestSetupTrait to detail where everything actually occurs.
To test this locally:
\Drupal\FunctionalTests\BrowserTestBaseTest\Drupal\FunctionalTests\BrowserTestBaseTestNote that the parent site might create an .htaccess in the system temp folder - this is why the above steps should be done from the CLI and we don't assert that a .htaccess does in exist in that location in the new tests.
As this patch does not apply to 8.2.x we'll need to backport once it lands.
Comment #19
dawehnerMh, I don't really see this as part of the added test code ...
Comment #20
alexpottre #19 -
Comment #21
dawehnerFair
Comment #23
xjmCommitted to 8.3.x, thanks!
Setting PTBP for 8.2.x.
Comment #24
alexpottHere's a patch for 8.2.x - there are a number of differences because of improvements made to the how WebTestBase and BrowserTestBase share code.
Comment #25
catchBackport looks good to me, just a bit more change necessary, moving to RTBC.
Comment #26
catchCommitted/pushed to 8.2.x, thanks!
Comment #30
xjm