1. 23 Feb, 2017 1 commit
    • Test Speedup: Isolate Modulestore Signals · 2051c909
      There are a number of Django Signals that are on the modulestore's
      SignalHandler class, such as SignalHandler.course_published. These
      signals can trigger very expensive processes to occur, such as course
      overview or block structures generation. Most of the time, the test
      author doesn't care about these side-effects.
      
      This commit does a few things:
      
      * Converts the signals on SignalHandler to be instances of a new
        SwitchedSignal class, that allows signal sending to be disabled.
      
      * Creates a SignalIsolationMixin helper similar in spirit to the
        CacheIsolationMixin, and adds it to the ModuleStoreIsolationMixin
        (and thus to ModuleStoreTestCase and SharedModuleStoreTestCase).
      
      * Converts our various tests to use this new mechanism. In some cases,
        this means adjusting query counts downwards because they no longer
        have to account for publishing listener actions.
      
      Modulestore generated signals are now muted by default during test runs.
      Calls to send() them will result in no-ops. You can choose to enable
      specific signals for a given subclass of ModuleStoreTestCase or
      SharedModuleStoreTestCase by specifying an ENABLED_SIGNALS class
      attribute, like the following example:
      
          from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
      
          class MyPublishTestCase(ModuleStoreTestCase):
              ENABLED_SIGNALS = ['course_published', 'pre_publish']
      
      You should take great care when disabling signals outside of a
      ModuleStoreTestCase or SharedModuleStoreTestCase, since they can leak
      out into other tests. Be sure to always clean up, and never disable
      signals outside of testing. Because signals are essentially process
      globals, it can have a lot of unpleasant side-effects if we start
      mucking around with them during live requests.
      
      Overall, this change has cut the total test execution time for
      edx-platform by a bit over a third, though we still spend a lot in
      pre-test setup during our test builds.
      
      [PERF-413]
      David Ormsbee committed
  2. 06 Feb, 2017 1 commit
  3. 25 Jan, 2017 1 commit
  4. 23 Jan, 2017 1 commit
  5. 12 Jan, 2017 1 commit
  6. 29 Dec, 2016 1 commit
  7. 09 Dec, 2016 1 commit
  8. 07 Dec, 2016 1 commit
  9. 30 Nov, 2016 3 commits
  10. 18 Nov, 2016 3 commits
  11. 07 Nov, 2016 1 commit
  12. 25 Oct, 2016 1 commit
  13. 21 Oct, 2016 2 commits
  14. 20 Oct, 2016 1 commit
  15. 13 Oct, 2016 2 commits
  16. 12 Oct, 2016 2 commits
  17. 07 Oct, 2016 3 commits
  18. 06 Oct, 2016 2 commits
  19. 02 Oct, 2016 1 commit
  20. 30 Sep, 2016 3 commits
  21. 29 Sep, 2016 2 commits
  22. 28 Sep, 2016 1 commit
    • Updated `compute_grades` command for Django 1.8 · 675f5e97
      The interface for custom management commands changed in Django 1.8 which
      caused the `compute_grades` command to stop working. In order to fix it
      I added an `add_arguments` method for specifying the accepted arguments
      and updated the command to allow for passing a list of courses to run
      the `offline_grade_calculation` against.
      Tobias Macey committed
  23. 23 Sep, 2016 1 commit
    • Remove offline grade calc · 8857b35b
      This management command has been broken since before the django 1.8
      upgrade, so I'm deleting it and all its tests, and updating a few
      other files that used these methods but are easily refactored away.
      Eric Fischer committed
  24. 12 Sep, 2016 1 commit
  25. 19 Aug, 2016 1 commit
  26. 09 Aug, 2016 2 commits