#27596: LiveServerTestCase in 1.10.4 doesnt close server ports properly
---------------------------------------------+------------------------
               Reporter:  Mike Hibbert       |          Owner:  nobody
                   Type:  Bug                |         Status:  new
              Component:  Testing framework  |        Version:  1.10
               Severity:  Normal             |       Keywords:
           Triage Stage:  Unreviewed         |      Has patch:  0
    Needs documentation:  0                  |    Needs tests:  0
Patch needs improvement:  0                  |  Easy pickings:  0
                  UI/UX:  0                  |
---------------------------------------------+------------------------
 I get the following error when using LiveServerTestCase along with
 lettuce:

 Traceback (most recent call last):
   File "./manage.py", line 22, in <module>
     execute_from_command_line(sys.argv)
   File "/home/mike/Documents/python/bdd_older/local/lib/python2.7/site-
 packages/django/core/management/__init__.py", line 367, in
 execute_from_command_line
     utility.execute()
   File "/home/mike/Documents/python/bdd_older/local/lib/python2.7/site-
 packages/django/core/management/__init__.py", line 359, in execute
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/home/mike/Documents/python/bdd_older/local/lib/python2.7/site-
 packages/django/core/management/base.py", line 294, in run_from_argv
     self.execute(*args, **cmd_options)
   File "/home/mike/Documents/python/bdd_older/local/lib/python2.7/site-
 packages/django/core/management/base.py", line 345, in execute
     output = self.handle(*args, **options)
   File
 
"/home/mike/Documents/python/bdd_older/src/lettuce/lettuce/django/management/commands/harvest.py",
 line 191, in handle
     server.start()
   File
 "/home/mike/Documents/python/bdd_older/src/lettuce/lettuce/django/server.py",
 line 350, in start
     LiveServerTestCase.setUpClass()
   File "/home/mike/Documents/python/bdd_older/local/lib/python2.7/site-
 packages/django/test/testcases.py", line 1353, in setUpClass
     raise cls.server_thread.error
 socket.error: [Errno 98] Address already in use

 To reproduce the bug I've attached my Django project that can be run.

 The error occurs when you try to run the tests. The first time through it
 works fine but if you try and run the tests again with about 1 - 2mins it
 will give the error above.

 When I downgrade to 1.9.4 this works fine without the error.

--
Ticket URL: <https://code.djangoproject.com/ticket/27596>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.44ef13a451b82d00ff6f8dc64976c121%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to