Review main Merged

58008[TASK] typo3/testing-framework now flushes runtime caches

Michael Stucki CR +2 V +2 Easy +8 −42 updated 09/01/18, 14:20

Commit message

Unit test tearDown() now always calls
GeneralUtility::flushInternalRuntimeCaches() so most explicit
calls in unit tests can be removed.

composer require --dev typo3/testing-framework:~4.8.2

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Anja Leichsenring +1
    • Andreas Kienast +1
  • Verified V +2
    • Christian Kuhn +2
    • Anja Leichsenring +1
    • Andreas Kienast +1
    • TYPO3com +1 CI

Issues 2

Files 17

Review log 1620

  1. Michael Stucki uploaded patch set 1 08/23/18, 15:06

  2. Michael Stucki wrote 08/23/18, 15:06

    Topic set to 85948
  3. Christian Kuhn commented on patch set 1 CR -1 08/23/18, 15:08

    that shouldn't be needed: please mock the runtime cache in https://review.typo3.org/#/c/58005/ properly instead. also, cacheManager is a singleton, so getCache() will always return a new instance since singletons are not preserved in between tests. and globals are also always backed up and reset in between tests.
  4. Christian Kuhn commented on patch set 1 CR 0 08/23/18, 15:10

    ah sorry. scratch my comment. that was too quick without looking into details.
  5. Michael Stucki commented on patch set 1 08/23/18, 15:10

    Have a look into typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php where the same thing happens already now.
  6. Michael Stucki commented on patch set 1 08/23/18, 15:14

    FYI I searched for all locations where this might be necessary with the following command: git grep "flushInternalRuntimeCaches" | sed 's/:.*//' | sort -u | grep "Test" | xargs grep -B 5 -A 5 "_SERVER" Did not check if it's really needed in every place, but there's a good chance that it is...
  7. TYPO3com voted on patch set 1 V +1 08/23/18, 15:16 Completed build in 09m 48s on Thu, 23 Aug, 05:16 PM Test Summary: 35289 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26967

  8. Michael Stucki commented on patch set 1 08/23/18, 15:17

    Will wait with backporting until this change is submitted.
  9. Christian Kuhn commented on patch set 1 CR -1 08/23/18, 17:19

    ok. convinced. however, i tend to just put that call into our generic tearDown of typo3/testing-framework UnitTestCase, together with a comment that this can vanish when we finally managed to get rid of getIndPEnv altogether (there is new logic in v9, but it will take us at least one further version to fully roll that out). ... i'll update the patch accordingly.
  10. Christian Kuhn uploaded patch set 2 09/01/18, 13:57

  11. TYPO3com voted on patch set 2 V -1 09/01/18, 13:57 Completed build in 11s on Sat, 1 Sep, 03:57 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27475

  12. Christian Kuhn uploaded patch set 3 09/01/18, 13:58

  13. Christian Kuhn updated the commit message in patch set 4 09/01/18, 14:00

  14. TYPO3com voted on patch set 3 V +1 09/01/18, 14:09 Completed build in 10m 33s on Sat, 1 Sep, 04:09 PM Test Summary: 35902 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27476

  15. TYPO3com voted on patch set 4 V +1 09/01/18, 14:09 Completed build in 09m 28s on Sat, 1 Sep, 04:09 PM Test Summary: 35902 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27477

  16. Christian Kuhn commented on patch set 4 09/01/18, 14:16

    v8 needs a patch for typo3/testing-framework, too. i'll take care if master is in.
  17. Andreas Kienast voted on patch set 4 V +1 CR +1 09/01/18, 14:20

  18. Anja Leichsenring voted on patch set 4 V +1 CR +1 09/01/18, 14:20

  19. Christian Kuhn voted on patch set 4 V +2 CR +2 09/01/18, 14:20

  20. Christian Kuhn merged patch set 5 09/01/18, 14:20