Integration tests for AWS Neptune DB

do we have any Testcontainers for AWS Neptune for writing integration tests in java applications
4 Replies
spmallette
spmallette10mo ago
sorry - it seems that we've missed your question here. in short, there is no local Neptune container that you can write tests against. You would want to use Gremlin Server. There is a blog post on that: https://aws.amazon.com/blogs/database/automated-testing-of-amazon-neptune-data-access-with-apache-tinkerpop-gremlin/ please note that there are some gotchas when taking this approach as Gremlin Server would use TinkerGraph as the test graph which means that depending on the Gremlin you were testing you could run into differences between TinkerGraph and Neptune. You'd want to be aware of those differences and adjust your setup accordingly. @triggan and @Kennh have also done some thinking on this topic and might have something else to add.
Amazon Web Services
Automated testing of Amazon Neptune data access with Apache TinkerP...
Amazon Neptune, a fully managed graph database, is purpose built to work with highly connected data such as relationships between customers and products, or between pieces of equipment within a complex industrial plant. Neptune is designed to support highly concurrent online transaction processing (OLTP) over graph data models. Neptune supports ...
Kennh
Kennh10mo ago
Could you explain a little more in-depth the type of testing that you are doing? Is this something you want to run fairly often (per commit) or something that is run closer to releases?
salman_walmart
salman_walmart10mo ago
Hi @spmallette @Kennh thanks for your response., yes I would run these integration tests every commit, which will spin up the graph server and allow me to test my gremlin queries in my application as a part of my gradle build , something like this https://java.testcontainers.org/modules/databases/mongodb/ or may be some docker image for neptune/tinkerGraph In my application I am connecting to aws Neptune from my flink/java apps and reading/writing data from/into Neptune using gremlin/java I wanted to have Integration tests for the same
Kennh
Kennh10mo ago
If that is the case, then I think the blog that was linked earlier (https://aws.amazon.com/blogs/database/automated-testing-of-amazon-neptune-data-access-with-apache-tinkerpop-gremlin/) probably has the best setup for now. Its example show how you can use GremlinServer with TinkerGraph in a docker container as a test double for Neptune. Since it seems like you are using Java, you actually have a simpler option which is to just include tinkergraph-gremlin as a test dependency and run your queries directly against a local instance of TinkerGraph. As always, you'll want to keep in mind provider specific differences which are outlined for Neptune here https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-differences.html
Amazon Web Services
Automated testing of Amazon Neptune data access with Apache TinkerP...
Amazon Neptune, a fully managed graph database, is purpose built to work with highly connected data such as relationships between customers and products, or between pieces of equipment within a complex industrial plant. Neptune is designed to support highly concurrent online transaction processing (OLTP) over graph data models. Neptune supports ...
Gremlin standards compliance in Amazon Neptune - Amazon Neptune
Overview of differences between the Neptune and TinkerPop implementations of Gremlin.
Want results from more Discord servers?
Add your server