Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-35714

collect garbage after each unit test

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3, 2.4
    • Fix Version/s: 2.3.3
    • Component/s: Unit tests
    • Labels:

      Description

      The problem is that some code might have destroy actions which would be triggered a lot later.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            If you can revert MDL-34894 while doing this, it would be awesome, TIA!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - If you can revert MDL-34894 while doing this, it would be awesome, TIA!
            Hide
            skodak Petr Skoda added a comment -

            To integrators: please manually revert commits introduced by MDL-34894 if this gets integrated.

            Show
            skodak Petr Skoda added a comment - To integrators: please manually revert commits introduced by MDL-34894 if this gets integrated.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Integrated (23 and master), thanks!

            Also I've reverted the manual call to gc_collect_cycles() introduced by MDL-34894, because now it's called on all tests reset.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated (23 and master), thanks! Also I've reverted the manual call to gc_collect_cycles() introduced by MDL-34894 , because now it's called on all tests reset.
            Hide
            timb Tim Barker added a comment -

            David, this needs to be tested in a Windows environment, the Linux stuff is tested on the build machines. It will suffice to check the build results for Linux (they pass ).

            Show
            timb Tim Barker added a comment - David, this needs to be tested in a Windows environment, the Linux stuff is tested on the build machines. It will suffice to check the build results for Linux (they pass ).
            Hide
            dmonllao David Monllaó added a comment -

            Using Windows 7 with Apache 2.2, PHP 5.3.17, PHPUnit 3.7.7 and Postgres 9.2. I'm getting a single failure, with and without the patch, so I doubt that's caused by this issue, I've asked Matt about the last time phpunit was executed in a Win environment and he don't know anything about it. Some of you have a phpunit env in windows to discard that is due to my environment setup? To set up the environment I've followed http://docs.moodle.org/dev/PHPUnit_installation_in_Windows instructions

            Attaching screenshot

            Show
            dmonllao David Monllaó added a comment - Using Windows 7 with Apache 2.2, PHP 5.3.17, PHPUnit 3.7.7 and Postgres 9.2. I'm getting a single failure, with and without the patch, so I doubt that's caused by this issue, I've asked Matt about the last time phpunit was executed in a Win environment and he don't know anything about it. Some of you have a phpunit env in windows to discard that is due to my environment setup? To set up the environment I've followed http://docs.moodle.org/dev/PHPUnit_installation_in_Windows instructions Attaching screenshot
            Show
            matteo Matteo Scaramuccia added a comment - FYI: http://docs.moodle.org/dev/Common_unit_test_problems#collatorlib_testcase::test_asort_objects_by_method
            Hide
            dmonllao David Monllaó added a comment -

            Thanks Matteo, that's exactly what I was looking for. Passing it

            Show
            dmonllao David Monllaó added a comment - Thanks Matteo, that's exactly what I was looking for. Passing it
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            From somewhere within the clouds...

            Congrats, this has been sent upstream and is now part of Moodle (your favorite LMS platform). Many thanks for your awesome collaboration!

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - From somewhere within the clouds... Congrats, this has been sent upstream and is now part of Moodle (your favorite LMS platform). Many thanks for your awesome collaboration! Ciao

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Nov/12