Skip to content

Conversation

@daha
Copy link
Contributor

@daha daha commented Dec 5, 2025

I have noticed that tests/integration/neo4j/test_neo4j.py (in testIntegrationBatch2) is flaky and often fails with one or two of the Urns missing below:
Urn removed, urn:li:dataset:(urn:li:dataPlatform:neo4j,test_instance.SIMILAR_TO,TEST)
Urn removed, urn:li:dataset:(urn:li:dataPlatform:neo4j,test_instance.FOLLOWS,TEST)

It looks to me like the data is not always ready when the test starts. Wait for more objects to be ready in the database should make it less flaky.

It has failed about 10% (33 of 319) of all the runs the last 2 weeks.

I did run this test repeatedly locally (while having some random load on my computer) and every time it failed after 10-20 runs. I also noticed that then it only gets a few results from the MATCH (n) RETURN count(n) as count query. When I changed the threshold to wait for a count of at least 10 the test ran without errors. From my logging I saw that it typically only took one extra check to get from 2-4 to 17-19 (19 seems to be max).

@github-actions github-actions bot added ingestion PR or Issue related to the ingestion of metadata community-contribution PR or Issue raised by member(s) of DataHub Community labels Dec 5, 2025
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Dec 5, 2025
@daha daha force-pushed the fix-flaky-neo4j-integration-test branch from 658619d to e320b11 Compare December 5, 2025 23:22
@daha daha changed the title test: Make flaky neo4j integration test a lot less flaky test: make flaky neo4j integration test less flaky Dec 5, 2025
@deepgarg760 deepgarg760 enabled auto-merge (squash) December 8, 2025 12:18
@deepgarg760 deepgarg760 merged commit 0ef4419 into datahub-project:master Dec 8, 2025
57 checks passed
@daha daha deleted the fix-flaky-neo4j-integration-test branch December 8, 2025 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution PR or Issue raised by member(s) of DataHub Community ingestion PR or Issue related to the ingestion of metadata needs-review Label for PRs that need review from a maintainer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants