[ZCM] [ZC] 1728/ 4 Comment "Months-old 2.8 Windows test failures"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Sun May 8 08:22:37 EDT 2005


Issue #1728 Update (Comment) "Months-old 2.8 Windows test failures"
 Status Pending, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1728

==============================================================
= Comment - Entry #4 by mhammond on May 8, 2005 8:22 am

I actually don't think this is a "windows" problem as such.

test_config.py says:
# On Linux the default hostname is an empty string, but on Windows
# it's "localhost".  So factory.prepare() will replace factory.host
# with "127.0.0.1" only on non-Windows boxes.

In ZConfig.py, we can see code:
        server = HTTPServer.zhttp_server(ip=self.host, ...)
[Note that 'self.ip' also exists, and appears to be the ip when run from the test suite - although self.host is passed for 'ip']

What I think is happening is that on Linux, we have a default IP (127.0.0.1) and no default hostname.  On Windows, we have default IP *and* a default hostname ('localhost').  If the user overrides only one, things go wrong.

I expect that a Linux user could provoke the same error by (temporarily) making Linux default the host to 'localhost'.  This would at least help people familiar with ZConfig but not Windows to reproduce the error environment.

I have no idea why Zope has a different config default for Windows - if there is an underying Windows issue that requires this, I can't see reference to it.
________________________________________
= Comment - Entry #3 by tim_one on Mar 29, 2005 10:24 am

Understood -- I'm not yelling at you <wink>, I just pointed to the old bug report because it has additional info I didn't want to bother copying over to this one.

ZC has some test machines set aside, but-- alas --no bandwidth so far to set up an automated test runner for Windows.  It certainly sucks that test failures can persist for months without such a thing.
________________________________________
= Comment - Entry #2 by ajung on Mar 29, 2005 8:56 am

Yes, I closed the issue because I was not aware of any further problems on windows - especially not because we have no daily testrunner for Windows. (Un)fortunately I don't have a Windows
system here for further testing and debugging.

________________________________________
= Request - Entry #1 by tim_one on Mar 19, 2005 12:38 am

See

http://www.zope.org/Collectors/Zope/1507

for more info.  That bug got closed without fixing the Windows problems.  Most obvious is that these tests have been failing on Zope trunk since 14 October 2004.  Here from current Zope trunk, WinXP Pro SP2, Python 2.3.5:

FAIL: test_http_factory (ZServer.tests.test_config.ZServerConfigurationTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Code\Zope\lib\python\ZServer\tests\test_config.py", line 110, in test_http_factory
    self.assertEqual(server.ip, '127.0.0.1')
  File "C:\Python23\lib\unittest.py", line 302, in failUnlessEqual
    raise self.failureException, \
AssertionError: 'localhost' != '127.0.0.1'

======================================================================
FAIL: test_webdav_source_factory (ZServer.tests.test_config.ZServerConfigurationTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Code\Zope\lib\python\ZServer\tests\test_config.py", line 128, in test_webdav_source_factory
    self.assertEqual(server.ip, '127.0.0.1')
  File "C:\Python23\lib\unittest.py", line 302, in failUnlessEqual
    raise self.failureException, \
AssertionError: 'localhost' != '127.0.0.1'


==============================================================



More information about the Zope-Collector-Monitor mailing list