test: enable SQLAlchemy pooling in CI tests (#9279)
* test: enable SQLAlchemy pooling in CI tests Changes CI test config to use LETTA_DISABLE_SQLALCHEMY_POOLING=false, enabling connection pooling to match production settings. 🐾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com> * test: remove hardcoded LETTA_DISABLE_SQLALCHEMY_POOLING fixture from conftest Remove the fixture that hardcoded the pooling setting in test code. The value should instead come from the CI workflow environment via vars.LETTA_DISABLE_SQLALCHEMY_POOLING (same source as production). 🐾 Generated with [Letta Code](https://letta.com) Co-authored-by: Kian Jones <kianjones9@users.noreply.github.com> Co-Authored-By: Letta <noreply@letta.com> --------- Co-authored-by: Letta <noreply@letta.com> Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com> Co-authored-by: Kian Jones <kianjones9@users.noreply.github.com>
This commit is contained in:
@@ -67,15 +67,6 @@ def client(server_url: str) -> Letta:
|
||||
yield client_instance
|
||||
|
||||
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
def disable_db_pooling_for_tests():
|
||||
"""Disable database connection pooling for the entire test session."""
|
||||
os.environ["LETTA_DISABLE_SQLALCHEMY_POOLING"] = "true"
|
||||
yield
|
||||
if "LETTA_DISABLE_SQLALCHEMY_POOLING" in os.environ:
|
||||
del os.environ["LETTA_DISABLE_SQLALCHEMY_POOLING"]
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
async def cleanup_db_connections():
|
||||
"""Cleanup database connections after each test."""
|
||||
|
||||
Reference in New Issue
Block a user