-
Notifications
You must be signed in to change notification settings - Fork 46
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
NIO-related tests fail on Windows #12
Comments
Thanks Eric! I agree with you: we should implement a workaround that only affects the tests when run on a problematic platform. Instead of explicitly checking for which OS we're running on, we may want to just catch the exception and then retry after invoking the gc and sleep. -F |
Well, as it happens
may be somewhat problematic b/c the source of the issue lies with the closing (and no exception is produced there) whereas it manifests in either attempting to delete or attempting to reopen the same file/lock. Any concerns with placing "if this os is windows then GC and sleep" block in |
I haven't tested this locally so I may not properly grasp where and how the problem manifests. I was thinking we could put the Windows work around in Would that be sufficient? -F |
Yep, that'll do too, though there will remain a possibility of test-like flow (close, attempt to reopen/delete) happening in main (non-test) code. I'll put in the spot you mentioned for the time being. |
…NIO locks on Windows
…NIO locks on Windows
The fix for this has been merged. Thanks a lot! |
…NIO locks on Windows
There is a known issue concerning jvm's inability to support deletion of memory mapped files that is described here: http://stackoverflow.com/questions/4179145/release-java-file-lock-in-windows
This results in NIO-related tests failing on windows only
There are hacks like executing
prior to the deletion attempt.
The original thread started in issue #7.
I think it won't be right to change the main code (i.e not to use NIO) due to this problem. Perhaps all the tests that try to delete from the FS can call a common wrapper method which can check whether OS is a Windows flavor, and if so, implement the above hack.
The text was updated successfully, but these errors were encountered: