Review main Merged

74882[TASK] Reduce VFS usage in unit tests - Part 1

Anja Leichsenring CR +2 V +2 Hard +422 −404 updated 06/18/22, 23:42

Commit message

The component causes errors every once in a while and does not
provide a huge benefit anymore.
This part contains the low hanging fruits, the harder cases will
be tackled in other parts.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 19

Review log 3960

Show 1935 earlier messages
  1. Anja Leichsenring uploaded patch set 1 06/13/22, 12:06

  2. core-ci voted on patch set 1 V -1 06/13/22, 12:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28009

  3. Anja Leichsenring uploaded patch set 2 06/13/22, 12:15

  4. Anja Leichsenring uploaded patch set 3 06/13/22, 12:16

  5. core-ci voted on patch set 2 V -1 06/13/22, 12:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28010

  6. Anja Leichsenring uploaded patch set 4 06/13/22, 12:25

  7. core-ci voted on patch set 3 V -1 06/13/22, 12:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28011

  8. core-ci voted on patch set 4 V +1 06/13/22, 12:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28012

  9. Anja Leichsenring uploaded patch set 5 06/13/22, 13:12

  10. core-ci voted on patch set 5 V -1 06/13/22, 13:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28016

  11. Anja Leichsenring uploaded patch set 6 06/13/22, 13:21

  12. core-ci voted on patch set 6 V -1 06/13/22, 13:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28017

  13. Anja Leichsenring uploaded patch set 7 06/13/22, 14:15

  14. Anja Leichsenring uploaded patch set 8 06/13/22, 14:17

  15. core-ci voted on patch set 8 V -1 06/13/22, 14:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28019

  16. core-ci voted on patch set 7 V -1 06/13/22, 14:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28018

  17. Oliver Klee commented on patch set 8 06/13/22, 16:02

    FileWriterTest.php:59

    This method needs this annotation to avoid the PHPStan warning: /** * @return non-empty-string */

    FolderStructureTestCase.php:48

    To avoid the PHPStan warning: @return non-empty-string
  18. Anja Leichsenring uploaded patch set 9 06/14/22, 18:05

  19. Anja Leichsenring uploaded patch set 10 06/14/22, 18:12

  20. core-ci voted on patch set 9 V -1 06/14/22, 18:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28076

  21. core-ci voted on patch set 10 V -1 06/14/22, 18:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28077

  22. Anja Leichsenring uploaded patch set 11 06/14/22, 18:32

  23. Anja Leichsenring uploaded patch set 12 06/14/22, 18:38

  24. core-ci voted on patch set 11 V -1 06/14/22, 18:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28078

  25. Anja Leichsenring uploaded patch set 13 06/14/22, 18:43

  26. core-ci voted on patch set 12 V -1 06/14/22, 18:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28079

  27. Oliver Klee commented on patch set 13 06/14/22, 18:47

    FileWriterTest.php:59 Reply

    (You still can/should keep the native string return type declaration in addition to the PHPDoc type annotation.)
  28. Anja Leichsenring uploaded patch set 14 06/14/22, 18:49

  29. Anja Leichsenring commented on patch set 13 06/14/22, 18:49

    FileWriterTest.php:59 Reply

    Done

    FolderStructureTestCase.php:48 Reply

    Done
  30. core-ci voted on patch set 13 V +1 06/14/22, 18:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28080

  31. Anja Leichsenring updated the commit message in patch set 15 06/14/22, 18:52

  32. core-ci voted on patch set 14 V -1 06/14/22, 18:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28081

  33. core-ci voted on patch set 15 V -1 06/14/22, 19:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28082

  34. core-ci voted on patch set 15 V +1 06/14/22, 20:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28082

  35. Christian Kuhn voted on patch set 15 V +1 CR +1 06/15/22, 07:51

  1. Stefan Bürk voted on patch set 15 V +1 CR +1 06/15/22, 08:30

  2. Oli Bartsch commented on patch set 15 V -1 06/15/22, 09:08

    The test files and folders are not properly removed in /var/
  3. Anja Leichsenring commented on patch set 15 06/15/22, 09:52

    Reply

    can you tell me what remains for you? I had no artifacts left after unit test runs.
  4. Anja Leichsenring updated the commit message in patch set 16 06/15/22, 09:54

  5. core-ci voted on patch set 16 V +1 06/15/22, 10:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28092

  6. Oli Bartsch commented on patch set 16 06/15/22, 12:40

    Reply

    I executed: Build/Scripts/runTests.sh -s unit typo3/sysext/core/Tests/Unit typo3/sysext/install/Tests/Unit without and with this patch. Following directories remain only when having the patch applied: /var/ImageTest /var/LogRoot/ /var/Packages/ /var/public/
  7. Anja Leichsenring commented on patch set 16 06/15/22, 12:49

    Reply

    thanks, that helps. I will see to clean that up.
  8. Anja Leichsenring uploaded patch set 17 06/17/22, 08:46

  9. Anja Leichsenring commented on patch set 17 06/17/22, 08:47

    I cleaned up all files left over by the unit tests I touched. There is more left over, but out of scope for this patch.
  10. Anja Leichsenring commented on patch set 17 06/17/22, 08:47

    Reply

    Done
  11. core-ci voted on patch set 17 V -1 06/17/22, 08:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28131

  12. Anja Leichsenring uploaded patch set 18 06/17/22, 11:57

  13. Anja Leichsenring commented on patch set 18 06/17/22, 11:59

    I opened a big can of worms by making sure tests clean up behind themselves. PS 18 contains only fixes for tests that relied on any test directory being created, instead making sure of it. Now they do. Problem was dicovered through unitRandom runs, I tested until I had 10 good runs under the belt, with counting starting over for each failure. Good thing the full run only takes 35 seconds on my local environment.
  14. Anja Leichsenring uploaded patch set 19 06/17/22, 12:03

  15. core-ci voted on patch set 18 V -1 06/17/22, 12:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28138

  16. core-ci voted on patch set 19 V -1 06/17/22, 12:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28139

  17. Oliver Klee commented on patch set 19 06/17/22, 12:32

    Anja, what exact problems did we have with vfsStream? Maybe we can adapt something on that front instead.
  18. Anja Leichsenring uploaded patch set 20 06/17/22, 12:44

  19. Anja Leichsenring commented on patch set 20 06/17/22, 12:44

    Reply

    vfsStream is no real benefit anymore, and currently it can't be adapted to run with PHP 8.2. It is also a dependency we not really need and if possible, we can get rid of.
  20. core-ci voted on patch set 20 V +1 06/17/22, 12:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28144

  21. Oliver Klee commented on patch set 20 06/17/22, 13:12

    Reply

    Ack
  22. Oliver Klee commented on patch set 20 06/17/22, 14:15

    FYI, vfsStream is going to support PHP 8.2 quite soon: https://github.com/bovigo/vfsStream/issues/271
  23. Stefan Bürk voted on patch set 20 V +1 CR +1 06/18/22, 23:42

  24. Christian Kuhn voted on patch set 20 V +2 CR +2 06/18/22, 23:42

  25. Christian Kuhn merged patch set 21 06/18/22, 23:42