From 4465373177249bb939a37f2c5d384dc1fb1ab348 Mon Sep 17 00:00:00 2001 From: Jesse Zoldak Date: Wed, 12 Oct 2016 11:00:20 -0400 Subject: [PATCH] Disable migrations by default in unittests Rendering model states when running migrate in Django 1.8 consumes on the order of 4x-6x more memory than <1.8. References: * https://code.djangoproject.com/ticket/24745 * https://code.djangoproject.com/ticket/24743 This is causing failures in Jenkins as the workers run out of memory and either processes cannot fork or the Out Of Memory Killer kills a process that is running tests. Disabling migrations until we do either or both of these: * Upgrade to Django 1.9 and turn them back on. See EV-92 "Discovery: Upgrade edx-platform to Django 1.9" * Address TE-1310 "Unit tests should be able to run without migrations" --- docs/en_us/internal/testing.rst | 6 ------ pavelib/utils/test/suites/python_suite.py | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/docs/en_us/internal/testing.rst b/docs/en_us/internal/testing.rst index df460cdf57..9e628568d1 100644 --- a/docs/en_us/internal/testing.rst +++ b/docs/en_us/internal/testing.rst @@ -173,12 +173,6 @@ To run these tests without ``collectstatic``, which is faster, append the follow paver test_system -s lms --fasttest -For even more speed, use the ``--disable-migrations`` option to run tests without applying migrations and instead create tables directly from apps' models. - -:: - - paver test_system -s lms --disable-migrations - To run cms python tests without ``collectstatic`` use this command. :: diff --git a/pavelib/utils/test/suites/python_suite.py b/pavelib/utils/test/suites/python_suite.py index f205c6eae4..3d918c5c97 100644 --- a/pavelib/utils/test/suites/python_suite.py +++ b/pavelib/utils/test/suites/python_suite.py @@ -18,7 +18,7 @@ class PythonTestSuite(TestSuite): def __init__(self, *args, **kwargs): super(PythonTestSuite, self).__init__(*args, **kwargs) self.opts = kwargs - self.disable_migrations = kwargs.get('disable_migrations', False) + self.disable_migrations = kwargs.get('disable_migrations', True) self.fasttest = kwargs.get('fasttest', False) self.subsuites = kwargs.get('subsuites', self._default_subsuites)