fix(client): handle silent-skip anti-pattern in test_gremlin.py#336
Conversation
…setUpClass - Remove automatic connectivity probe that silently skipped all 6 Gremlin integration tests on 404 / timeout / connection error - Endpoint failures now surface as FAILED, not SKIPPED - Add explicit opt-in skip via SKIP_GREMLIN_TESTS env variable - Document Docker-based local setup in inline comments Fixes apache#327 Related: apache#325, apache#320 Signed-off-by: Muawiya-contact <contactmuawia@gmail.com>
|
Hey @imbajin 👋 PR #336 is up for #327 — one file changed, small and focused. Quick recap of what's in it:
Ready for your review whenever you get a chance! 🙏 |
There was a problem hiding this comment.
Pull request overview
Removes the silent-skip connectivity probe from TestGremlin.setUpClass so that Gremlin endpoint failures surface as test failures rather than skipped tests. An explicit opt-in skip mechanism is added via the SKIP_GREMLIN_TESTS environment variable, and the accompanying unit tests in TestGremlinSetupBehavior are updated to reflect the new behavior.
Changes:
- Drop the
try/except NotFoundErrorprobe that auto-skipped all Gremlin tests when the endpoint was unreachable. - Add
SKIP_GREMLIN_TESTS=trueenv-var opt-in path that raisesunittest.SkipTest. - Rewrite/extend behavior tests: rename the old "skips on 404" test to "reraises probe errors" and add a new test for the env-var skip path.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@imbajin can you review that one, please? |
imbajin
left a comment
There was a problem hiding this comment.
One non-blocking maintainability suggestion from the follow-up review.
|
@imbajin |
maybe we could add some skills for hugegraph & graphrag/text2gremlin? or set a goal for:
|
What this PR does
Fixes the silent-skip anti-pattern in
test_gremlin.py— previously, if the Gremlin endpoint was down, all 6 tests would silently show as SKIPPED in CI instead of FAILED, hiding real regressions.Fixes #327 · Related: #325, #320
The problem
Any connectivity issue would silently swallow failures and mark tests as skipped. A broken endpoint would look green in CI. Not good.
The fix
setUpClassRunning locally
Test results
Files changed
Only one file touched:
hugegraph-python-client/src/tests/api/test_gremlin.py