Project

General

Profile

Bug #13375

Testabbruch durch Socket-Timeouts

Added by Michael Howitz almost 6 years ago. Updated over 5 years ago.

Status:
Fix released
Priority:
High (P2)
Category:
Backend RC
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Keywords:

Description

Bei Testläufen kommt es ab und zu vor, dass ein Socket-Timeout bei der Kommunikation mit dem Selenium auftritt. Das führt in der Konsequenz dazu, dass der gesamte Testlauf ohne Ergebnis abbricht.

Beispiel eines Transcripts aus dem Terminal:

Running verdi.zentral.testing.ZentralSiteLayer:Selenium tests:
  Tear down verdi.zentral.testing.ZentralSiteLayer:Browser in 0.000 seconds.
  Tear down verdi.zentral.testing.ZentralSiteLayer:WSGI in 0.001 seconds.
  Set up Products.uccore.testing.LoggingToStdErrLayer in 0.000 seconds.
  Set up verdi.zentral.testing.ZentralSiteLayer:WSGI in 0.131 seconds.
  Set up Products.uccore.testing.ZentralSiteLayer:FavIcon in 0.002 seconds.
  Set up verdi.zentral.testing.ZentralSiteLayer:FixupMiddleware in 0.000 seconds.
  Set up verdi.zentral.testing.ZentralSiteLayer:HttpServer in 0.002 seconds.
  Set up verdi.zentral.testing.ZentralSiteLayer:Selenium in 7.512 seconds.
  Running:
    7/82 (8.5%) test_comment_can_be_sent_without_entering_name (verdi.zentral.browser.tests.test_comments.CommentsTest)

Error in test test_comment_can_be_sent_without_entering_name (verdi.zentral.browser.tests.test_comments.CommentsTest)
Traceback (most recent call last):
  File "/Users/mac/Projekte/python/buildout.python/parts/opt/lib/python2.7/unittest/case.py", line 332, in run
    testMethod()
  File "/Users/mac/Projekte/UCMS/trunk_verdi/src/verdi.zentral/src/verdi/zentral/browser/tests/test_comments.py", line 85, in test_comment_can_be_sent_without_entering_name
    s.open(doc_url + '/commentsForDoc')
  File "/Users/mac/Projekte/python/eggs/gocept.selenium-2.1.0-py2.7.egg/gocept/selenium/selenese.py", line 106, in open
    self.selenium.do_command("open", [url, ignoreResponseCode])
  File "/Users/mac/Projekte/python/eggs/selenium-2.39.0-py2.7.egg/selenium/selenium.py", line 222, in do_command
    response = conn.getresponse()
  File "/Users/mac/Projekte/python/buildout.python/parts/opt/lib/python2.7/httplib.py", line 1045, in getresponse
    response.begin()
  File "/Users/mac/Projekte/python/buildout.python/parts/opt/lib/python2.7/httplib.py", line 409, in begin
    version, status, reason = self._read_status()
  File "/Users/mac/Projekte/python/buildout.python/parts/opt/lib/python2.7/httplib.py", line 365, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "/Users/mac/Projekte/python/buildout.python/parts/opt/lib/python2.7/socket.py", line 476, in readline
    data = self._sock.recv(self._rbufsize)
timeout: timed out

Error in test test_comment_can_be_sent_without_entering_name (verdi.zentral.browser.tests.test_comments.CommentsTest)
Traceback (most recent call last):
  File "/Users/mac/Projekte/python/buildout.python/parts/opt/lib/python2.7/unittest/case.py", line 361, in run
    self.tearDown()
  File "/Users/mac/Projekte/UCMS/trunk_verdi/src/Products.uccore/Products/uccore/testing.py", line 936, in tearDown
    self.selenium.deleteAllVisibleCookies()
  File "/Users/mac/Projekte/python/eggs/gocept.selenium-2.1.0-py2.7.egg/gocept/selenium/selenese.py", line 32, in inner
    return getattr(self.selenium, name)(*args, **kw)
  File "/Users/mac/Projekte/python/eggs/selenium-2.39.0-py2.7.egg/selenium/selenium.py", line 1842, in delete_all_visible_cookies
    self.do_command("deleteAllVisibleCookies", [])
  File "/Users/mac/Projekte/python/eggs/selenium-2.39.0-py2.7.egg/selenium/selenium.py", line 222, in do_command
    response = conn.getresponse()
  File "/Users/mac/Projekte/python/buildout.python/parts/opt/lib/python2.7/httplib.py", line 1045, in getresponse
    response.begin()
  File "/Users/mac/Projekte/python/buildout.python/parts/opt/lib/python2.7/httplib.py", line 409, in begin
    version, status, reason = self._read_status()
  File "/Users/mac/Projekte/python/buildout.python/parts/opt/lib/python2.7/httplib.py", line 365, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "/Users/mac/Projekte/python/buildout.python/parts/opt/lib/python2.7/socket.py", line 476, in readline
    data = self._sock.recv(self._rbufsize)
timeout: timed out

Traceback (most recent call last):
  File "bin/test-all", line 333, in <module>
    '--test-path', '/Users/mac/Projekte/UCMS/trunk_verdi/src/lu.indexer.verdi',
  File "/Users/mac/Projekte/python/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/__init__.py", line 35, in run
    failed = run_internal(defaults, args, script_parts=script_parts)
  File "/Users/mac/Projekte/python/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/__init__.py", line 48, in run_internal
    runner.run()
  File "/Users/mac/Projekte/python/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 138, in run
    self.run_tests()
  File "/Users/mac/Projekte/python/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 219, in run_tests
    setup_layers, self.failures, self.errors)
  File "/Users/mac/Projekte/python/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 376, in run_layer
    return run_tests(options, tests, layer_name, failures, errors)
  File "/Users/mac/Projekte/python/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 308, in run_tests
    test(result)
  File "/Users/mac/Projekte/python/buildout.python/parts/opt/lib/python2.7/unittest/case.py", line 396, in __call__
    return self.run(*args, **kwds)
  File "/Users/mac/Projekte/python/buildout.python/parts/opt/lib/python2.7/unittest/case.py", line 307, in run
    result.startTest(self)
  File "/Users/mac/Projekte/python/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 691, in startTest
    self.testSetUp()
  File "/Users/mac/Projekte/python/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 676, in testSetUp
    layer.testSetUp()
  File "/Users/mac/Projekte/python/eggs/gocept.selenium-2.1.0-py2.7.egg/gocept/selenium/seleniumrc.py", line 72, in testSetUp
    self['selenium'].setTimeout(self._timeout * 1000)
  File "/Users/mac/Projekte/python/eggs/gocept.selenium-2.1.0-py2.7.egg/gocept/selenium/selenese.py", line 86, in setTimeout
    self.selenium.set_timeout(timeout)
  File "/Users/mac/Projekte/python/eggs/selenium-2.39.0-py2.7.egg/selenium/selenium.py", line 1740, in set_timeout
    self.do_command("setTimeout", [timeout,])
  File "/Users/mac/Projekte/python/eggs/selenium-2.39.0-py2.7.egg/selenium/selenium.py", line 222, in do_command
    response = conn.getresponse()
  File "/Users/mac/Projekte/python/buildout.python/parts/opt/lib/python2.7/httplib.py", line 1045, in getresponse
    response.begin()
  File "/Users/mac/Projekte/python/buildout.python/parts/opt/lib/python2.7/httplib.py", line 409, in begin
    version, status, reason = self._read_status()
  File "/Users/mac/Projekte/python/buildout.python/parts/opt/lib/python2.7/httplib.py", line 365, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "/Users/mac/Projekte/python/buildout.python/parts/opt/lib/python2.7/socket.py", line 476, in readline
    data = self._sock.recv(self._rbufsize)
socket.timeout: timed out
mac@bobo: ~/Projekte/UCMS/trunk_verdi
$

Associated revisions

Revision 646:5189e4c935a5 (diff)
Added by Michael Howitz over 5 years ago

No longer stop whole test run if an exception occures during ``testSetUp``. (re #13375)

History

#1 Updated by Michael Howitz over 5 years ago

  • % Done changed from 0 to 100
  • Target version set to 2.x
  • Assignee set to Michael Howitz
  • Status changed from New to Fix released

Exception wird jetzt ignoriert, dient ja nur dem Setzen eines Timeouts.
Released in 2.1.8.

Also available in: Atom PDF