#19051 closed Bug (fixed)
Error in testing/live-test-server example
Reported by: | German Larrain | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
https://docs.djangoproject.com/en/1.4/topics/testing/#live-test-server
In
MySeleniumTests.tearDownClass
this
cls.selenium.quit()
must appear before calling
super(MySeleniumTests, cls).tearDownClass()
Otherwise the test will fail with the following message: "RuntimeError: Failed to shutdown the live test server in 2 seconds. The server might be stuck or generating a slow response."
Change History (4)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Has patch: | unset |
---|---|
Triage Stage: | Unreviewed → Accepted |
On my system, ordering of those lines can be swapped without failures, so it may be system dependent (tested with selenium 2.20 and 2.25). But it makes sense to quit selenium before trying to kill the thread, so +1 for the change (both in docs and in AdminSeleniumWebDriverTestCase).
comment:3 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I can reproduce this error and confirm the suggested resolution fixes it by running Django's test suite. Could another core dev +1 to make sure I'm not missing something?