(chore): Make neo4j tests skipped for failing ones#54
Conversation
WalkthroughThis PR migrates the test skip mechanism from generic string-based Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
integration/cypher_test.go (2)
112-116: Include stack traces in panic recovery output.Current recovery reports panic value only. Adding stack output will make integration failures much faster to triage.
Proposed patch
import ( "context" "encoding/json" "errors" "fmt" "os" "path/filepath" + "runtime/debug" "slices" "testing" @@ defer func() { if r := recover(); r != nil { - t.Fatalf("panic: %v", r) + t.Fatalf("panic: %v\n%s", r, debug.Stack()) } }()🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@integration/cypher_test.go` around lines 112 - 116, The panic recovery currently only logs the recovered value; update the defer recovery block to include the goroutine stack trace by importing runtime/debug and appending debug.Stack() to the t.Fatalf message (i.e., keep the recover handling around the same defer with if r := recover(); r != nil { ... } but call t.Fatalf with both the panic value and string(debug.Stack())) so failures in the test (integration/cypher_test.go) show the full stack trace for faster triage.
102-104: Consider logging file-level skips for visibility.Case-level skips are explicit, but file-level skips are currently silent. A lightweight log here would improve run diagnostics.
Proposed patch
if slices.Contains(cf.SkipDrivers, driver) { + t.Logf("skipping case file for driver %s", driver) continue }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@integration/cypher_test.go` around lines 102 - 104, The file-level skip branch that checks slices.Contains(cf.SkipDrivers, driver) silently continues; add a lightweight log before continue to record the file-level skip (e.g., use t.Logf or the package logger available in the test) indicating which driver was skipped and why (reference cf.SkipDrivers and driver), so replace the silent continue with a log statement followed by continue.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@integration/cypher_test.go`:
- Around line 112-116: The panic recovery currently only logs the recovered
value; update the defer recovery block to include the goroutine stack trace by
importing runtime/debug and appending debug.Stack() to the t.Fatalf message
(i.e., keep the recover handling around the same defer with if r := recover(); r
!= nil { ... } but call t.Fatalf with both the panic value and
string(debug.Stack())) so failures in the test (integration/cypher_test.go) show
the full stack trace for faster triage.
- Around line 102-104: The file-level skip branch that checks
slices.Contains(cf.SkipDrivers, driver) silently continues; add a lightweight
log before continue to record the file-level skip (e.g., use t.Logf or the
package logger available in the test) indicating which driver was skipped and
why (reference cf.SkipDrivers and driver), so replace the silent continue with a
log statement followed by continue.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8640b50c-4022-4ae1-8cf0-82ee59a84d49
📒 Files selected for processing (5)
integration/cypher_test.gointegration/testdata/cases/expansion_inline.jsonintegration/testdata/cases/nodes.jsonintegration/testdata/cases/nodes_inline.jsonintegration/testdata/cases/shortest_paths.json
Description
Create a skip system that skips failing tests so we can backlog/resolve them independently.
Resolves: PQE-411
Type of Change
Testing
go test -tags manual_integration ./integration/...)Checklist
Summary by CodeRabbit