Opened 15 years ago

Closed 14 years ago

#4998 closed (fixed)

Database activity makes test cases very slow

Reported by: Russell Keith-Magee Owned by: nobody
Component: Testing framework Version: dev
Severity: Keywords:
Cc: remco@…, egmanoj@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


The level of database activity required by the test system renders the testing process painfully slow. This is especially bad with django.test.TestCase - resets are very expensive operations, which can significantly slow down the testing process (to impractical speeds).

Change History (7)

comment:1 Changed 15 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

comment:2 Changed 15 years ago by Simon G. <dev@…>

comment:3 Changed 15 years ago by Nis Jørgensen <nis@…>

Just out of curiosity: In my experience, this is a big problem with postgresql, and almost no problem with sqlite (which runs in-memory for tests). How slow are things in the other backends?

comment:4 Changed 15 years ago by anonymous

Cc: remco@… added

comment:5 Changed 15 years ago by Manoj Govindan <egmanoj@…>

Cc: egmanoj@… added

comment:6 Changed 14 years ago by simon

This relates to #8138 which proposes running tests in transactions to speed up the database reset operation.

comment:7 Changed 14 years ago by Karen Tracey

Resolution: fixed
Status: newclosed

I'm going to call this fixed by r9756/#8138. There is perhaps more to do with speeding things up, but the specific item called out in the initial description here, that is the slowness of django.test.TestCase, was fixed in r9756.

Note: See TracTickets for help on using tickets.
Back to Top