[ 
https://issues.apache.org/jira/browse/GORA-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17344738#comment-17344738
 ] 

ASF GitHub Bot commented on GORA-650:
-------------------------------------

kamaci commented on a change in pull request #218:
URL: https://github.com/apache/gora/pull/218#discussion_r632677448



##########
File path: 
gora-arangodb/src/test/java/org/apache/gora/arangodb/ArangoDBTestDriver.java
##########
@@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.gora.arangodb;
+
+import org.apache.gora.GoraTestDriver;
+import org.apache.gora.arangodb.store.ArangoDBStore;
+import org.apache.gora.arangodb.store.ArangoDBStoreParameters;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testcontainers.containers.GenericContainer;
+
+/**
+ * Driver to set up an embedded ArangoDB database instance for Gora
+ * dataStore specific integration tests.
+ */
+public class ArangoDBTestDriver extends GoraTestDriver {
+
+  private static Logger log = 
LoggerFactory.getLogger(ArangoDBTestDriver.class);
+
+  private GenericContainer arangodbContainer;
+
+  public ArangoDBTestDriver(GenericContainer arangodbContainer) {
+    super(ArangoDBStore.class);
+    this.arangodbContainer = arangodbContainer;
+  }
+
+
+  public ArangoDBTestDriver() {
+    super(ArangoDBStore.class);
+  }
+
+  /**
+   * Initialize embedded ArangoDB server instance as per the 
gora-arangodb-mapping.xml
+   * server configuration file.
+   */
+  @Override
+  public void setUpClass() throws Exception {
+    log.info("Setting up ArangoDB test driver");
+    conf.set(ArangoDBStoreParameters.ARANGO_DB_SERVER_HOST, "localhost");
+    conf.set(ArangoDBStoreParameters.ARANGO_DB_SERVER_PORT,
+            arangodbContainer.getMappedPort(8529).toString());
+    log.info("ArangoDB Embedded Server started successfully.");
+  }
+
+  /**
+   * Terminate embedded ArangoDB server.
+   */
+  @Override
+  public void tearDownClass() throws Exception {
+    log.info("ArangoDB Embedded server instance terminated successfully.");
+  }
+
+  @Override
+  public <K, T extends Persistent> DataStore<K, T> createDataStore(Class<K> 
keyClass,
+                                                                   Class<T> 
persistentClass) throws GoraException {
+

Review comment:
       Remove extra space




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add datastore for ArangoDB
> --------------------------
>
>                 Key: GORA-650
>                 URL: https://issues.apache.org/jira/browse/GORA-650
>             Project: Apache Gora
>          Issue Type: New Feature
>    Affects Versions: 0.9
>            Reporter: Kevin Ratnasekera
>            Priority: Major
>              Labels: gsoc2020
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> May be we should consider extending our multimodal datastore support with 
> ArangoDB. [1] 
> [1] https://www.arangodb.com/why-arangodb/multi-model/



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to