trial -u intermittent error: WindowsError: [Error 145] The directory is not empty: 'C:\\temp\\_trial_temp.lock'

[email protected]
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from ivank <[email protected]>:

C:\temp>python C:\Python26\Scripts\trial.py -u -e twisted.test.test_udp.UDPTestCase.testSendPackets

{{{
...successes elided...
-------------------------------------------------------------------------------
Ran 1 tests in 0.004s

PASSED (successes=1)
Test Pass 262
twisted.test.test_udp
  UDPTestCase
    testSendPackets ...                                                    [OK]

-------------------------------------------------------------------------------
Ran 1 tests in 0.005s

PASSED (successes=1)
Test Pass 263
twisted.test.test_udp
  UDPTestCase
    testSendPackets ...                                                    [OK]

-------------------------------------------------------------------------------
Ran 1 tests in 0.006s

PASSED (successes=1)
Test Pass 264
twisted.test.test_udp
  UDPTestCase
    testSendPackets ...                                                    [OK]

-------------------------------------------------------------------------------
Ran 1 tests in 0.006s

PASSED (successes=1)
Test Pass 265
twisted.test.test_udp
  UDPTestCase
    testSendPackets ...                                                    [OK]
Traceback (most recent call last):
  File "C:\Python26\Scripts\trial.py", line 22, in <module>
    run()
  File "C:\Python26\lib\site-packages\twisted\scripts\trial.py", line 359, in run
    test_result = trialRunner.runUntilFailure(suite)
  File "C:\Python26\lib\site-packages\twisted\trial\runner.py", line 893, in runUntilFailure
    result = self._runWithoutDecoration(test)
  File "C:\Python26\lib\site-packages\twisted\trial\runner.py", line 862, in _runWithoutDecoration
    self._tearDownTestdir(oldDir)
  File "C:\Python26\lib\site-packages\twisted\trial\runner.py", line 770, in _tearDownTestdir
    self._testDirLock.unlock()
  File "C:\Python26\lib\site-packages\twisted\python\lockfile.py", line 188, in unlock
    rmlink(self.name)
  File "C:\Python26\lib\site-packages\twisted\python\lockfile.py", line 82, in rmlink
    os.rmdir(filename)
WindowsError: [Error 145] The directory is not empty: 'C:\\temp\\_trial_temp.lock'
}}}

I did not start another process at this time. This happens on its own. After trial exits due to the exception, `_trial_temp\test.log`, `_trial_temp\test.log`, and a directory `_trial_temp.lock` remain.

It might be necessary to occupy CPU time to reproduce this bug, using something like OCCT or Prime95.

I tested with Server 2008 SP1, Python 2.6.2 32 bit, Twisted r27226 (built with VS2008).

----------
Type     : defect
Component: trial
Keywords : 
Priority : normal
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/3971
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.