Django test suite taking > 2 hours, gets stuck, have to Ctrl-C

689 views
Skip to first unread message

Dylan Verheul

unread,
Apr 22, 2017, 4:20:07 AM4/22/17
to Django developers (Contributions to Django itself)
Hi, I am trying to contribute my first patch (see ticket 28105).

I am following the instructions on https://docs.djangoproject.com/en/1.11/intro/contributing/, but the test suite just gets stuck after about 11K-12K tests (depending on version and python version).

Example: Ran 11904 tests in 2963.657s (runtests, Python 2, after Ctrl-C)


I have actually let the tests run overnight, but no result.


I have tried both runtests and tox, Python 2 and Python 3, master branch and stable/1.11.x.


My patch and tests are about done, but I am really stuck trying to get the test suite to work properly.


My hardware is a new MacBook Pro with several Django and Python projects running on it (including tests). I use pyenv and brew to manage my python environments.


Any help in getting the test suite to run would be greatly appreciated.


Thanks.


Dylan

Collin Anderson

unread,
Apr 22, 2017, 10:09:42 AM4/22/17
to django-d...@googlegroups.com
Hi Dylan,

Was there a traceback when you pressed ctrl+c? That might show where it's getting stuck.

You could try using --parallel=1 to disable multi-process which might also give you some more information.

(And does the test suite run fine without your patch? :)

I assume you're testing using the sqlite database?

Good luck,
Collin


--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscribe@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/907c23ac-2086-41ce-b2cb-4ca171ff4247%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Josh Smeaton

unread,
Apr 22, 2017, 9:15:05 PM4/22/17
to Django developers (Contributions to Django itself)
While it's important to figure out the cause of the hang (and the horrendous runtime - 2 hours is far too long), in future you could try using the vagrant image https://github.com/django/django-box to run your tests. It comes loaded with all supported python versions and databases (except Oracle), which should remove most issues related to environment and packages.

Collin's debugging suggestions are good. It'll be interesting to see where the tests are hanging for you. Can I also suggest running them with -v 2 or -v 3 to get a printout of which tests have been run and where they're stopping?


On Sunday, 23 April 2017 00:09:42 UTC+10, Collin Anderson wrote:
Hi Dylan,

Was there a traceback when you pressed ctrl+c? That might show where it's getting stuck.

You could try using --parallel=1 to disable multi-process which might also give you some more information.

(And does the test suite run fine without your patch? :)

I assume you're testing using the sqlite database?

Good luck,
Collin

On Sat, Apr 22, 2017 at 1:34 AM, 'Dylan Verheul' via Django developers (Contributions to Django itself) <django-d...@googlegroups.com> wrote:
Hi, I am trying to contribute my first patch (see ticket 28105).

I am following the instructions on https://docs.djangoproject.com/en/1.11/intro/contributing/, but the test suite just gets stuck after about 11K-12K tests (depending on version and python version).

Example: Ran 11904 tests in 2963.657s (runtests, Python 2, after Ctrl-C)


I have actually let the tests run overnight, but no result.


I have tried both runtests and tox, Python 2 and Python 3, master branch and stable/1.11.x.


My patch and tests are about done, but I am really stuck trying to get the test suite to work properly.


My hardware is a new MacBook Pro with several Django and Python projects running on it (including tests). I use pyenv and brew to manage my python environments.


Any help in getting the test suite to run would be greatly appreciated.


Thanks.


Dylan

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.

Claude Paroz

unread,
Apr 23, 2017, 1:24:01 PM4/23/17
to Django developers (Contributions to Django itself)
Reply all
Reply to author
Forward
0 new messages