- 🇺🇸United States smustgrave
So if this were an issue wouldn't we see this random fail on other tickets?
Can we update the MR for 10.1 please.
- 🇭🇺Hungary mxr576 Hungary
So if this were an issue wouldn't we see this random fail on other tickets?
AFAIK tests on Drupal CI are not running in parallel... but we do execute them in parallel to save time with the help a tool like https://github.com/Pronovix/testrunner.
If you check my core credits, you can see I have a long history with hunting down and killing these race conditions that are almost always around mkdir()...
- Status changed to Needs review
almost 2 years ago 7:46am 3 February 2023 - Status changed to RTBC
almost 2 years ago 3:02pm 3 February 2023 - 🇺🇸United States smustgrave
Thank you for the explanation.
Don't see any issue with adding a directory check in the test trait personally. Lets see what the committers say.
- Status changed to Needs work
almost 2 years ago 2:29am 10 February 2023 - Status changed to Needs review
almost 2 years ago 5:53am 11 February 2023 - Status changed to RTBC
almost 2 years ago 11:40pm 19 February 2023 - 🇺🇸United States smustgrave
Threads appeared to be addressed. The open one about the comment is hard to tell but I think it has.
- Status changed to Needs work
almost 2 years ago 12:43am 8 March 2023 - 🇬🇧United Kingdom alexpott 🇪🇺🌍
Re #11 - tests on DrupalCI are run in greater parallelisation than anywhere I've set up testing. I'm not convinced by the fix here. \Drupal\Core\File\FileSystem::prepareDirectory() already does an exists check if the mkdir fails. Also doing this so far from \Drupal\Core\Test\FunctionalTestSetupTrait::prepareEnvironment() (where the directory is supposed to be created) doesn't feel right. Furthermore each test has it's own folder so I'm not even sure how the race occurs - i.e each test gets a unique directory inside sites/simpletest.
I think what might be good to see is the return value from
\Drupal::service('file_system')->prepareDirectory($this->siteDirectory, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS);
checked and a more helpful error thrown if it is FALSE. - 🇬🇧United Kingdom alexpott 🇪🇺🌍
Also I don't think this is a major bug - if we had lots of reports of this occurring then I would agree but so far we have a single report.