Skip to content
mbghsource edited this page Sep 10, 2019 · 3 revisions

Building and Testing

To build locally you need to clone the repository to your machine, follow this guide.

Installation & Testing

The ArangoDB TinkerPop Provider can be built locally via

mvn clean install -DskipTests

Note that we skip tests since not ALL TinkerPop tests pass (failing ones are known to fail - there are some issues/discrepancies between the tests and how the ArangoDB provider is implemented).

Testing

The ArangoDB TinkerPop Provider is tested against the TinkerPop Test Suite. The test suite is fairly big and can take some time to run. We recommend creating separate run configurations for your tests. For this, the environmental variable GREMLIN_TESTS can be used to run a specific test class; the value of the variable must be the qualified name of the test class you want to run:

For example, to only run the GraphTest class we can set it to org.apache.tinkerpop.gremlin.structure.GraphTest. Then we can run JUnit against the ArangoDBGraphTest class. Depending on your preferred development environment configuring this will be different. For example, in Eclipse you can use the Environment tab in the JUnit Run Configuration to set the GREMLIN_TESTS value. In IntelliJ, there is an Environment variables entry that can be used to do the same.

Tests "OK" to Fail

Due to some incompatibilities between what TinkerPop expects form the provider and the ArangoDB implementation, there are some tests that fail. We list some of the known fails and a short description of why. This is not an exhaustive list.

GraphTest

  • shouldAddVertexWithUSerSuppliedStringId: This is related to how ArangoDB manages documents' IDs and keys. See Differences
  • shouldEvaluateConnectivityPatterns: This is related to how ArangoDB manages documents' IDs and keys. See Differences

PropertyTest

ArangoDB does not store exact type information. So when storing an Integer in the DB, it will be returned as a Long; value wise it is OK, but TinkerPop tests expect the exact type to be returned. We have added a workaround by storing the precise value's type when storing the properties and then using this information to restore the value when queried. However, for collections and maps we are not storing the type of each element, so we get expected type discrepancies.

  • supportsSerializableValues: Fails because the mocked class used is not serializable with VPack.

VertexPropertyTest

  • shouldAllowIdAssignment This is related to how ArangoDB manages documents' IDs and keys. See Differences

PropertyTest

  • supportsMapValues: This is related to how ArangoDB serializes and de-serializes primitive types. Although we keep track of attribute types, when serializing complex types (e.g. maps) we don't keep track of nested types too.
  • supportsMixedListValues: This is related to how ArangoDB serializes and de-serializes primitive types. Although we keep track of attribute types, when serializing complex types (e.g. lists) we don't keep track of nested types too.
  • supportsSerializableValues: This is related to how Velocipack handles object serialization.
  • supportsUniformListValues: This is related to how ArangoDB serializes and de-serializes primitive types. Although we keep track of attribute types, when serializing complex types (e.g. lists) we don't keep track of nested types too.