Project

General

Profile

Actions

Task #41224

closed

Temporary files should be deleted after test is done

Added by Nicole Cordes over 11 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Tests
Target version:
Start date:
2012-09-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
medium
Sprint Focus:

Description

In some tests (e.g. TYPO3\CMS\Core\Tests\Unit\Resource\Driver\LocalDriverTest) temp files are created. Those aren't deleted after test was done and mass up temp folder. Maybe we could add some routine to tearDown function to collect temporary files and delete them.

Actions #1

Updated by Oliver Hader over 11 years ago

  • Category set to Tests
  • Status changed from New to Accepted
  • Complexity set to medium
Actions #2

Updated by Mathias Schreiber over 9 years ago

  • Status changed from Accepted to Needs Feedback
  • Assignee set to Nicole Cordes

mind pushing a patch for this one? :)

Actions #3

Updated by Anja Leichsenring about 9 years ago

  • Sprint Focus set to On Location Sprint
Actions #4

Updated by Steffen Müller about 9 years ago

Afaik these temp files are a workaround for known issues in vfsStream.

We should evaluate if replacing temp files with vfsStream is a solution nowadays with PHP >=5.4

touch(), chown(), chgrp() and chmod() only work with PHP >= 5.4 because support of stream wrappers for those functions was first added with PHP 5.4, see issue #56. With PHP 5.3 an error with the message "Unable to create file vfs://... because No such file or directory" will be raised

https://github.com/mikey179/vfsStream/wiki/Known-Issues

Actions #5

Updated by Christian Kuhn about 9 years ago

  • Status changed from Needs Feedback to Closed

We had a clean up round in this area and at the moment all files created by unit tests are deleted afterwards so there are no leftovers (functionals are encapsulated within sub directories of typo3temp and those will stay).

Issue is rejected for now. Please create a fresh issue if you still find unit tests creating files and not removing them (easy to solve then with putting the stuff to $this->testFilesToDelete[] or similar, see UnitTestBase class.

Actions #6

Updated by Anja Leichsenring over 8 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions

Also available in: Atom PDF