Skip to content

Latest commit

 

History

History
62 lines (44 loc) · 2.09 KB

File metadata and controls

62 lines (44 loc) · 2.09 KB

Development Guide

Setup

bundle install

Running tests

bundle exec rspec                                        # full suite
bundle exec rspec spec/shared/integration/session_spec.rb       # one file
bundle exec rspec spec/shared/integration/session_spec.rb:42    # one example
bundle exec rspec './spec/shared/integration/session_spec.rb[1:2:3]'  # nested rspec id
bundle exec rspec --format documentation                 # verbose

Environment variables (export or use direnv):

TEST_NEO4J_URL=bolt://localhost:7687
TEST_NEO4J_USER=neo4j
TEST_NEO4J_PASS=password

Running Neo4j in Docker

docker run -p 7687:7687 -e NEO4J_AUTH=neo4j/password neo4j:5

Swap the tag (4.4, 5, 5.22, etc.) to test protocol negotiation against different Bolt versions.

Pre-commit checks

bundle exec rspec
git diff | grep -iE "puts |binding\.pry|debugger"   # catch debug artefacts

Reference drivers

When implementing protocol-level code, compare against the official drivers:

Debugging tips

  • Hung test: usually a connection stuck on fetch_response. Check @consumed/@discarded on the relevant Result, and whether the server was left in FAILED state without a RESET.
  • Wrong type coming back: check the hydration handler in bolt/connection.rb and compare the packing in packstream/packer.rb.
  • Temporal zone issues: see the LOCAL-encoding note in CLAUDE.md.

Spec links