Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subprocess unit test exception on Windows Vista #95

Open
aaaaalbert opened this issue Oct 2, 2015 · 0 comments
Open

subprocess unit test exception on Windows Vista #95

aaaaalbert opened this issue Oct 2, 2015 · 0 comments
Labels

Comments

@aaaaalbert
Copy link
Contributor

@Ashmita89 reports that ut_seash_subprocess.py (not really a test, but a test support script) fails on her Windows Vista machine. It looks as if the test nodemanager that this script starts does not stop quickly enough and thus doesn't release its file handles in time for the script to clean up.

Traceback

C:\Users\Ashmita\seash\RUNNABLE>python utf.py -f  ut_seash_allmodules.py
Testing module: seash
Now starting subprocess: ut_seash_subprocess.py
Generating user keys...
Generating owner key...
Writing config file...
Writing vessel dictionary...
Now running setup script: ut_seash_setup.py
        Running: ut_seash_setup.py                                  [ PASS ]
        Running: ut_seash_allmodules.py                             [ PASS ]
Now stopping subprocess: ut_seash_subprocess.py
Removing: v1
Removing: v10
Removing: v2
Traceback (most recent call last):
  File "ut_seash_subprocess.py", line 53, in <module>
    shutil.rmtree(vesseldirectoryname)
  File "C:\Python26\lib\shutil.py", line 221, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "C:\Python26\lib\shutil.py", line 219, in rmtree
    os.remove(fullname)
WindowsError: [Error 32] The process cannot access the file because it is being
used by another process: 'v2\\nodemanager.old'

C:\Users\Ashmita\seash\RUNNABLE>

Proposed fix

sleep for a few seconds after killing the nodemanager process, and/or retry deleting the file multiple times on encountering WindowsErrors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant