Increase socket timeout for selenium tests
I can reproduce bug 1100771 consistently in my development environment. Increasing the socket timeout in the SeleniumTestCase class fixes the timeout issue for me. This uncovers another issue that causes an "Address already in use error". This happens because the order of tear down is wrong - we need to quit() the driver before continuing with tear down rather than after. Fixes bug 1100771. Change-Id: I95fbea05c3fc2516ce4e736eea9b0823bb5bbf79
This commit is contained in:
parent
cf8d5d92da
commit
5e58a7e388
@ -19,6 +19,7 @@
|
||||
# under the License.
|
||||
|
||||
import os
|
||||
import socket
|
||||
|
||||
from django import http
|
||||
from django import test as django_test
|
||||
@ -161,10 +162,11 @@ class SeleniumTestCase(django_test.LiveServerTestCase):
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
super(SeleniumTestCase, cls).tearDownClass()
|
||||
if os.environ.get('WITH_SELENIUM', False):
|
||||
cls.selenium.quit()
|
||||
super(SeleniumTestCase, cls).tearDownClass()
|
||||
|
||||
def setUp(self):
|
||||
socket.setdefaulttimeout(10)
|
||||
self.ui = selenium_ui
|
||||
super(SeleniumTestCase, self).setUp()
|
||||
|
Loading…
x
Reference in New Issue
Block a user