mgedmin / zodbbrowser

ZODB browser
http://launchpad.net/zodbbrowser
Other
19 stars 6 forks source link

Tests fail on Windows (file is being used by another process during teardown) #2

Closed mgedmin closed 10 years ago

mgedmin commented 10 years ago

All the failures are in tearDown, and they look like this:

Traceback (most recent call last):
  Module unittest.case, line 360, in run
    self.tearDown()
  Module zodbbrowser.ftests.test_standalone, line 163, in tearDown
    shutil.rmtree(self.tempdir)
  Module shutil, line 252, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  Module shutil, line 250, in rmtree
    os.remove(fullname)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\users\\mg\\appdata\\local\\temp\\2\\tmp1513gnzodbbrowser\\empty.fs'

It seems that when we start the server in a thread and then stop it, that server doesn't close the database. This is not a problem on Linux but a big problem on Windows.

Note that my Window Jenkins slave currently cannot run the tests easily, thanks to the Rackspace SSL download issues. For all the other projects I use pip 1.5 as a workaround, but this is impossible for zodbbrowser, thanks to two reasons:

mgedmin commented 10 years ago

My current testing strategy is:

  1. tox -e py27
  2. when it fails to build package X because no C compiler (and no binary wheels), run .tox/py27/scripts/easy_install X
  3. go to step 1
mgedmin commented 10 years ago

Thanks to https://github.com/mgedmin/wheelwright I can now run tests on Jenkins (and see this failure).

mgedmin commented 10 years ago

Proof that this is fixed:

ekrano nuotrauka i 2014-06-20 18 09 03