Integration tests with Neo4j, Docker and a temporary file system

39 views Asked by At

In my current project we have created a number of integration tests that use a Neo4j DB as part of our CI/CD pipeline. As the number of tests grow the pipeline slows down and one common suggestion for other databases is to mount your database in memory to avoid I/O. Now, I tried running our docker container with

    docker run -it --rm -p 7474:7474 -p 7687:7687 -p 8080:8080   \
    --mount type=tmpfs,destination=/data \
    --mount type=tmpfs,destination=/logs \
    --mount type=tmpfs,destination=/var/lib/neo4j/data \
    --mount type=tmpfs,destination=/var/lib/neo4j/logs \
    --mount type=tmpfs,destination=/var/lib/neo4j/metrics \

Note that /var/lib/neo4j/data seems to be a symlink to /data so I just mapped both. I also verified with df -h that they actually are mapped to tmpfs.

All looked good, so it was disappointing to see that there was no speed-up of our tests. Are there any official Neo4J resources on have anyone had any luck in doing this with Neo4J?

0

There are 0 answers