#20483: Reduce the set of apps seen by individual tests
--------------------------------------+------------------------------------
     Reporter:  akaariai              |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Testing framework     |                  Version:  master
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  1                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  1
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by akaariai):

 I think I am going to do these changes & commit:
   1. app_mask is used if the TestCase has it set. Otherwise all apps are
 used. So, no need for _ALWAYS_INSTALLED_APPS hack.
   2. add some way (environment variable?) to enable "warn on missing
 app_mask" so that we can eventually have app_mask for every Django's test.
   3. manually cascade the TRUNCATE for postgresql (travel all reverse
 foreign keys, add found tables to the truncate command)

 When all test cases have requirements marked, we could get rid of
 runtests.py ALWAYS_INSTALLED_APPS and instead create tables for apps in
 set(t.app_mask for t in testcases).

 Some numbers from testing this on postgresql: 4500s unpatched, 300s with
 this ticket's patch. The time doesn't include database creation, so the
 full time is probably more like 4700s vs 500s. Still, order of magnitude
 difference.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20483#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.f0eadba2e1b118d02972507d1c4ec20c%40djangoproject.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to