#27665 closed Bug (duplicate)
More than one instance of Chrome locks up LiveServerTestCase
| Reported by: | Luke Plant | Owned by: | nobody |
|---|---|---|---|
| Component: | Testing framework | Version: | 1.10 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Example code:
from django.test import LiveServerTestCase
from selenium import webdriver
class TestChrome(LiveServerTestCase):
def test(self):
url = self.live_server_url
driver1 = webdriver.Chrome()
driver1.get(url)
driver1.get(url) # This 2nd get seems to be needed to trigger the bug
driver2 = webdriver.Chrome()
driver2.get(url)
driver1.quit()
driver2.quit()
This code was added to tests.py in an otherwise blank project (no views or anything necessary), and run using ./manage.py test
Result: the second Chrome window simply hangs trying to load the URL.
Tested with:
- Django 1.10.4
- Selenium 2.53.6
- Chrome 55.0.2883.87 (Official Build) (64-bit)
- ChromeDriver 2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320)
Upgrading to Selenium 3 is not an option - so many things are broken (like any half-decent Firefox support, as far as I can tell).
I'm guessing this might be to do with Chrome holding open connections. If I close the first Chrome window, the second one then succeeds to load the page.
Change History (2)
comment:1 by , 9 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
comment:2 by , 9 years ago
That sounds good - thanks (assuming my guess about the cause is correct).
#20238 is open to support multiple open connections in
LiveServerTestCase. Can we consider this a duplicate of that?