georgia-tech-db / evadb

Database system for AI-powered apps
https://evadb.ai/docs
Apache License 2.0
2.64k stars 262 forks source link

Fixes broken unit test - test_evadb_client #1454

Open Tanish0019 opened 6 months ago

Tanish0019 commented 6 months ago

Problem

Unit test suite is broken. (Last run) Broken test - CMDClientTest::test_evadb_client Error: RuntimeError: There is no current event loop in thread 'MainThread' The test runs fine when run individually but fails when whole suite is run together because other asyncio tests update the asyncio loop settings and policies.

Solution

Update test class to extend from IsolatedAsyncioTestCase which provides better isolation when running multiple asyncio test units.

Tanish0019 commented 6 months ago

Hi @xzdandy, I was just playing around with the project and caught this quick fix so thought about contributing back. Currently the build is failing in the Install Evadb package step unrelated to my change. Do you know if this is a known issue or we can trigger a retry maybe? Thanks!