-
Notifications
You must be signed in to change notification settings - Fork 16
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
Generated socket files are to long #310
Comments
Possibly relevant pytest-dev/pytest#5802 |
@koffie does setting TMPDIR helps overcoming this issue? If I read the internet correctly, the limit on socket paths is around 100 characters (104 on Macos, BSD, 107 on linux) |
Yes this helps, the way I solved it is by adding:
to setup.cfg . But I guess setting TMPDIR might also work (I didn't test the TMPDIR solution since our project uses setup.cfg for configuration). It might be good for the adaption of pytest-redis by others to replace the redis.exceptions.ConnectionError: Error connecting to unix socket: /private/var/folders/s9/fpx7c2mj6cj4y80p28bt7c3m0000gn/T/pytest-of-maartenderickx/pytest-3/pytest-redis-redis_proc0/redis.29482.sock. AF_UNIX path too long. warning by an explanation of the adopts and TMPDIR fixes. Since on OS X it is literally the first error you encounter when trying to give this project a spin (i.e. before even writing any serious tests just to see if the project actually does what I want it to do). |
p.s after the above fix this project does indeed do what I expect it to do. So thanks for that! |
@koffie Yes, I think that we can calculate the length of a socket path and produce a meaningful warning with explanation. + Paragraph for README |
Raise more informative error if the unixsocket is too long - closes #310
@koffie no readme paragraph, But I think that the error itself should be informative enough 🤔 |
What action do you want to perform
I want to use pytest-redis on OS X . I made a simplified test function based on the documentation
What are the results
The following error is raised:
redis.exceptions.ConnectionError: Error connecting to unix socket: /private/var/folders/s9/fpx7c2mj6cj4y80p28bt7c3m0000gn/T/pytest-of-maartenderickx/pytest-3/pytest-redis-redis_proc0/redis.29482.sock. AF_UNIX path too long.
What are the expected results
a succesfully run testcase where no error is raised but instead the test has failed because 'test' is not equal to 1
The text was updated successfully, but these errors were encountered: