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

UnsupportedOperationException: View 'unix' not available #371

Closed
glebsts opened this issue Jun 16, 2017 · 3 comments
Closed

UnsupportedOperationException: View 'unix' not available #371

glebsts opened this issue Jun 16, 2017 · 3 comments
Labels
Milestone

Comments

@glebsts
Copy link
Contributor

glebsts commented Jun 16, 2017

Hello,
thank you for cool library. I was impressed at Geekout and started building project with that.
My desktop OS is Windows.

https://github.com/testcontainers/testcontainers-java/blob/master/core/src/main/java/org/testcontainers/utility/MountableFile.java#L269
try { return (int) Files.getAttribute(path, "unix:mode"); } catch (IOException e) { // fallback for non-posix environments .....

If we look at javadoc for Files.getAttribute(), and its source in JDK, we can see and trace that in case of not-existing attribute view (as 'unix' if file is on windows file system), UnsupportedOperationException is thrown, not IOException. Everything fails here without any fallback to non-posix env.

Is it a (known) bug, or I am doing something wrong?

@rnorth
Copy link
Member

rnorth commented Jun 18, 2017

Ah, thanks for using the library and reporting this @glebsts.

It looks like this is a bug - I must have missed that it's an UnsupportedOperationException that's thrown, so I apologise. We can fix this fairly easily, though.

@bsideup bsideup added this to the 1.3.1 milestone Jun 18, 2017
@glebsts
Copy link
Contributor Author

glebsts commented Jun 20, 2017

Added PR #376

Wonder why selenium tests failed on that? https://travis-ci.org/testcontainers/testcontainers-java/jobs/244861859

@bsideup
Copy link
Member

bsideup commented Jun 20, 2017

Hi @glebsts,

Flaky test, I'll re-trigger. See #373

bsideup pushed a commit that referenced this issue Jun 20, 2017
…ationException (#376)

* #371 'posix fallback bug' - added fallback in case of UnsupportOperationException

* #371 'posix fallback bug' - changelog update
@glebsts glebsts closed this as completed Jun 21, 2017
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

3 participants