Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#18913 closed Uncategorized (worksforme)

Selenium admin_inlines test fails

Reported by: Anssi Kääriäinen Owned by: nobody
Component: Testing framework Version: dev
Severity: Normal Keywords:
Cc: jason@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The admin_inlines tests are failing for me beginning with selenium versions 2.21.3 or later. The result is:

s..Es...........................
======================================================================
ERROR: tearDownClass (regressiontests.admin_inlines.tests.SeleniumFirefoxTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/akaariai/Programming/django/tests/django/contrib/admin/tests.py", line 24, in tearDownClass
    super(AdminSeleniumWebDriverTestCase, cls).tearDownClass()
  File "/home/akaariai/Programming/django/tests/django/test/testcases.py", line 1170, in tearDownClass
    cls.server_thread.join()
  File "/home/akaariai/Programming/django/tests/django/test/testcases.py", line 1094, in join
    self.httpd.shutdown()
  File "/home/akaariai/Programming/django/tests/django/test/testcases.py", line 985, in shutdown
    "Failed to shutdown the live test server in 2 seconds. The "
RuntimeError: Failed to shutdown the live test server in 2 seconds. The server might be stuck or generating a slow response.

----------------------------------------------------------------------
Ran 29 tests in 14.939s

I have tracked this down to something creating a request that takes more than 2 seconds to read. This request is generated so that it is in progress at shutdown time. Setting the timeout in the server teardown from 2 seconds to bigger will fix this issue, but it would be nice to understand what is generating the slow request.

With selenium 2.21.2 and before I get this from the tests:

sss...........................
----------------------------------------------------------------------
Ran 27 tests in 38.970s

Note that the tests skipped are different, and they take a _long_ time to get skipped...

This might be very much configuration dependant, so, here is my pip freeze:

Jinja2==2.6
MySQL-python==1.2.3
Pygments==1.5
Sphinx==1.1.3
argparse==1.2.1
cx-Oracle==5.1.2
distribute==0.6.24
docutils==0.9.1
ipdb==0.7
ipython==0.13
psycopg2==2.4.5
selenium==2.21.3
wsgiref==0.1.2

I am using Ubuntu 12.04, Firefox is version 15.0 from Ubuntu's repository.

Change History (2)

comment:1 by Jason Mayfield, 12 years ago

Resolution: worksforme
Status: newclosed

With a current checkout of Django and selenium==2.25.0, the admin_inlines.SeleniumFirefoxTests tests run without issue. The Selenium-only tests run in total of 5.8s, the entire admin_inlines set of tests runs in 9.7s.

To me, this feels like it's not a Django test problem.

comment:2 by Jason Mayfield, 12 years ago

Cc: jason@… added
Note: See TracTickets for help on using tickets.
Back to Top