- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 55
Add Async Support #303
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
Add Async Support #303
Conversation
| Sorry about the previous PR #302 it was wrong | 
| should pass all checks now. | 
| @luqasz any thoughts on this? | 
| @theGowda Do you want to add tests ? | 
| 
 I have never written async tests. Basically have to copy everything with async await. | 
Co-authored-by: Łukasz Kostka <lukasz.g.kostka@gmail.com>
Co-authored-by: Łukasz Kostka <lukasz.g.kostka@gmail.com>
| @theGowda you can run tests locally. | 
| 
 Ya the integration tests passed. | 
| 
 https://github.com/luqasz/librouteros/actions/runs/12126034808/job/33859566156 | 
| 
 I had to install pytest-asyncio as dev dependency for the async tests. Is that causing it? Because tests seem to pass locally. | 
| Everything is written in actions output. | 
| 
 i'll complete the unit tests and push a commit | 
| Async integration tests are failing. Looks like it can't connect. You can download docker images with routeros vms. | 
| 
 But I dont understand why it is failing. I ran integration tests locally using  qcow2 images as suggested in the readme file. I'll check with your images | 
| Maybe increase timeout in  | 
commit dca389e Author: theGowda <sachin08gowda@gmail.com> Date: Fri Dec 6 19:46:10 2024 +0530 remove comment commit 32b7e79 Author: theGowda <sachin08gowda@gmail.com> Date: Fri Dec 6 19:17:00 2024 +0530 mypy fix commit 923af8d Author: theGowda <sachin08gowda@gmail.com> Date: Fri Dec 6 19:11:58 2024 +0530 increased timeout commit 8c50e0a Author: theGowda <sachin08gowda@gmail.com> Date: Fri Dec 6 14:08:33 2024 +0530 fix test commit 9a3f942 Author: theGowda <sachin08gowda@gmail.com> Date: Fri Dec 6 13:43:13 2024 +0530 increase async timeout in tests
| 
 changed it to 60 for now in tests | 
| @luqasz can you please re-run the failed tests. it will pass. | 
| Pytest throws this warning both ni unit and integration tests. | 
| 
 That's fine. Just a warning. Its about the asyncio loop. I don't think it'll affect the functioning in our case | 
| OK. Final review. | 
| @theGowda can you please move  | 
| 
 Okay. I'll move the tests | 
| @luqasz i think you sould stop the test for python 3.12. its been running for 10mins now | 
| Seems that on  | 

Added async support. Uses asyncio.open_connection which provied StreamReader and Writer