Skip to content
Snippets Groups Projects
Commit d88a416d authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Do not suppress touch() error in a test

releaseDoesNotRemoveFilesNotWithinTypo3TempLocksDirectory() is
a bit flaky on CI.

This seems to happen occassionally with unitRandom, but is hard
to track down, and there may be multiple reasons. One possible
reason is that touch() fails, maybe due to a different test
changing Environment, but not resetting it. Unfortunately, we
do not see a warning when touch() fails since it is suppressed
with `@`. This was introduced in #88255, then skipping the test,
and that skip operation has been removed with #102110.

To see if the touch operation is the root of all evil, we'll for
now remove the `@` again to potentially receive a php warning
with an early fail. This may make this situation reproducible
locally, to drill down the true reason of this occassional fail.

Resolves: #103911
Related: #88255
Related: #102110
Releases: main
Change-Id: I642df9579751e1415c2aa6edb9c27b1aff6d8454
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84396


Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
parent a2d9e7dc
Branches
Tags
No related merge requests found
......@@ -90,7 +90,7 @@ final class SimpleLockStrategyTest extends UnitTestCase
public function releaseDoesNotRemoveFilesNotWithinTypo3TempLocksDirectory(string $file): void
{
// Create test file
@touch($file);
touch($file);
// Create instance, set lock file to invalid path
$lock = $this->getAccessibleMock(SimpleLockStrategy::class, null, ['999999999']);
$lock->_set('filePath', $file);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment