fix: wait for postgres to be ready before tests
This commit is contained in:
parent
e492a18987
commit
ed6e8eb0d2
5 changed files with 28 additions and 8 deletions
6
.github/workflows/test_common.yml
vendored
6
.github/workflows/test_common.yml
vendored
|
|
@ -98,6 +98,12 @@ jobs:
|
|||
mkdir .cognee_system
|
||||
echo $(pwd)/.cognee_system
|
||||
|
||||
- name: Wait for PostgreSQL to be ready
|
||||
run: |
|
||||
echo "Waiting for PostgreSQL to be ready..."
|
||||
until pg_isready -h localhost -p 5432 -U cognee; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
- name: Run tests
|
||||
run: poetry run pytest tests/
|
||||
|
|
|
|||
14
.github/workflows/test_neo4j.yml
vendored
14
.github/workflows/test_neo4j.yml
vendored
|
|
@ -63,13 +63,6 @@ jobs:
|
|||
virtualenvs-in-project: true
|
||||
installer-parallel: true
|
||||
|
||||
- name: Wait for PostgreSQL to be ready
|
||||
run: |
|
||||
echo "Waiting for PostgreSQL to be ready..."
|
||||
until pg_isready -h localhost -p 5432 -U cognee; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
- name: Install dependencies
|
||||
run: poetry install --no-interaction
|
||||
|
||||
|
|
@ -78,6 +71,13 @@ jobs:
|
|||
mkdir .cognee_system
|
||||
echo $(pwd)/.cognee_system
|
||||
|
||||
- name: Wait for PostgreSQL to be ready
|
||||
run: |
|
||||
echo "Waiting for PostgreSQL to be ready..."
|
||||
until pg_isready -h localhost -p 5432 -U cognee; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
- name: Run default Neo4j
|
||||
env:
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
|
|
|
|||
7
.github/workflows/test_qdrant.yml
vendored
7
.github/workflows/test_qdrant.yml
vendored
|
|
@ -71,6 +71,13 @@ jobs:
|
|||
mkdir .cognee_system
|
||||
echo $(pwd)/.cognee_system
|
||||
|
||||
- name: Wait for PostgreSQL to be ready
|
||||
run: |
|
||||
echo "Waiting for PostgreSQL to be ready..."
|
||||
until pg_isready -h localhost -p 5432 -U cognee; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
- name: Run default Qdrant
|
||||
env:
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
|
|
|
|||
6
.github/workflows/test_weaviate.yml
vendored
6
.github/workflows/test_weaviate.yml
vendored
|
|
@ -71,6 +71,12 @@ jobs:
|
|||
mkdir .cognee_system
|
||||
echo $(pwd)/.cognee_system
|
||||
|
||||
- name: Wait for PostgreSQL to be ready
|
||||
run: |
|
||||
echo "Waiting for PostgreSQL to be ready..."
|
||||
until pg_isready -h localhost -p 5432 -U cognee; do
|
||||
sleep 1
|
||||
|
||||
- name: Run default Weaviate
|
||||
env:
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ class Neo4jAdapter(GraphDBInterface):
|
|||
):
|
||||
self.driver = driver or AsyncGraphDatabase.driver(
|
||||
graph_database_url,
|
||||
auth = (graph_database_username, graph_database_password)
|
||||
auth = (graph_database_username, graph_database_password),
|
||||
max_connection_lifetime = 120
|
||||
)
|
||||
|
||||
async def close(self) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue