Review main Merged

60869[BUGFIX] Remove side effect of unit test

Anja Leichsenring CR +2 V +2 Easy +13 −0 updated 06/04/19, 06:00

Commit message

The class typo3/sysext/frontend/Tests/Unit/Middleware/SiteResolverTest
manipulates the locale setting of the environment without
restoring it. So following tests might get affected by this change
and are not independent anymore.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Benni Mack +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Benni Mack +1

Issues 1

Files 1

Review log 1012

  1. Anja Leichsenring uploaded patch set 1 06/03/19, 16:30

  2. TYPO3com voted on patch set 1 V +1 06/03/19, 16:45 Completed build in 14m 48s on Mon, 3 Jun, 06:45 PM Test Summary: 46478 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-34154

  3. Oliver Klee commented on patch set 1 CR -1 06/03/19, 17:51

    SiteResolverTest.php:381

    This needs to go into tearDown (and the saving of the backup value into setUp). The reason: Assertion failures are implemented as exceptions, i.e., the method is exited. So if this tests fails for some reason, the locale will not be restored, causing potential unrelated test failures down the road.
  4. Benni Mack uploaded patch set 2 06/04/19, 05:41

  5. Benni Mack uploaded patch set 3 06/04/19, 05:45

  6. Benni Mack voted on patch set 3 V +1 CR +1 06/04/19, 05:45

  7. Georg Ringer voted on patch set 3 V +2 CR +2 06/04/19, 05:49

  8. Georg Ringer merged patch set 4 06/04/19, 05:50

  9. Benni Mack commented on patch set 4 06/04/19, 05:53

    No backport needed as the affected changes just gets introduced within the next change. In fact, we should have added this "fix" in the other change.
  10. Anja Leichsenring commented on patch set 4 06/04/19, 05:57

    > Patch Set 4: > > No backport needed as the affected changes just gets introduced within the next change. In fact, we should have added this "fix" in the other change. that is not correct, I managed to fail another test in random mode without the patch you mention. The side effect should be removed also in lower versions.
  11. Benni Mack commented on patch set 4 06/04/19, 05:58

    how?
  12. TYPO3com voted on patch set 3 V +1 06/04/19, 06:00 Completed build in 15m 01s on Tue, 4 Jun, 08:00 AM Test Summary: 46478 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-34160