Wednesday, April 1, 2020

Re: Creating test databases in parallel

If you are trying to optimize the test flow, then you may want to spend some time shrinking your test databases to a more manageable size. Or have two sets; abbreviated and full, with the larger one to exercise your (unknown) edge cases.

hth

- Tom

On Apr 1, 2020, at 2:25 AM, cool-RR <ram.rachum@gmail.com> wrote:

Hi guys,

I'm trying to optimize our Django testing workflow.

We have 7 different databases, and Django spends a lot of time on these lines: 

Creating test database for alias 'main_database'...
Creating test database for alias 'foo_database'...
Creating test database for alias 'bar_database'...
Creating test database for alias 'baz_database'...

This is especially annoying when you're running just one test, but have to wait 1:30 minutes just for these test databases.

Is there any way to speed this up? Either by parallelizing it or in any other way. A few months ago I tried some naive code that parallelizes these actions, but it failed. (Unfortunately I don't have the error message saved.)


Thanks,
Ram.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6619ce10-6a0e-4fde-8d2c-fb81e6e2bd2c%40googlegroups.com.

No comments:

Post a Comment