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

Integration Tests Hanging Due to Deprecated Event Loop Handling #438

Open
circansm opened this issue Jun 10, 2024 · 2 comments
Open

Integration Tests Hanging Due to Deprecated Event Loop Handling #438

circansm opened this issue Jun 10, 2024 · 2 comments

Comments

@circansm
Copy link
Contributor

The issue I'm encountering may be due to my lack of knowledge regarding how tests are constructed and asyncio event loops are handled within the pytest-asyncio plugin. However, I thought it couldn't hurt to alert you to the issue in case it's something that should be addressed:

While running integration tests in the solana-py project to ensure my recent pull request modifications passed CI, I encountered an issue where tests would hang indefinitely. Upon further investigation, the tests appear to hang due to the deprecated handling of the asyncio event loop within the pytest-asyncio fixtures.

The specific warning encountered is related to DeprecationWarning: There is no current event loop, suggesting that the way event loops are managed and retrieved is outdated according to the latest asyncio and pytest-asyncio standards.

This issue affects all integration tests that rely on async functionality and needs a review to ensure compatibility with current best practices in asyncio event loop management. Addressing this may involve updating fixture setups and potentially reevaluating how asynchronous operations are handled within test configurations.

Unfortunately, this is a bit outside my scope of understanding, so I'm simply submitting this as an issue.

@michaelhly
Copy link
Owner

michaelhly commented Jun 10, 2024

Do you have docker running?

The integration tests first send health checks to your local solana node:

solana-py/tests/conftest.py

Lines 139 to 140 in 27a3468

def check() -> bool:
return event_loop.run_until_complete(http_client.is_connected())

If it can't reach it, it'll hang for 15 seconds and then fail ...

@circansm
Copy link
Contributor Author

I did have docker running, yes.

I didn't, however, configure any address for a Solana node. Is there some config I missed?

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

No branches or pull requests

2 participants