summaryrefslogtreecommitdiffstats
path: root/src/test/java/com/thinkaurelius/titan/graphdb
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/thinkaurelius/titan/graphdb')
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/CassandraGraphTest.java95
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/astyanax/AstyanaxGraphConcurrentTest.java24
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/astyanax/AstyanaxGraphPerformanceMemoryTest.java21
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/astyanax/AstyanaxGraphTest.java13
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/astyanax/AstyanaxPartitionGraphTest.java21
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedEventualGraphTest.java21
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedGraphConcurrentTest.java28
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedGraphMemoryPerformanceTest.java25
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedGraphTest.java13
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedPartitionGraphTest.java21
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftEventualGraphTest.java21
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphCacheTest.java28
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphConcurrentTest.java24
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphIterativeTest.java30
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphPerformanceMemoryTest.java22
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphSpeedTest.java56
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphTest.java13
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftOLAPTest.java20
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftOperationCountingTest.java25
-rw-r--r--src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftPartitionGraphTest.java21
20 files changed, 542 insertions, 0 deletions
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/CassandraGraphTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/CassandraGraphTest.java
new file mode 100644
index 0000000..0aab994
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/CassandraGraphTest.java
@@ -0,0 +1,95 @@
+package com.thinkaurelius.titan.graphdb;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.core.TitanFactory;
+import com.thinkaurelius.titan.diskstorage.cassandra.AbstractCassandraStoreManager;
+import com.thinkaurelius.titan.diskstorage.configuration.ConfigElement;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.graphdb.database.StandardTitanGraph;
+import com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static com.thinkaurelius.titan.diskstorage.cassandra.AbstractCassandraStoreManager.*;
+
+/**
+ * @author Joshua Shinavier (http://fortytwo.net)
+ */
+public abstract class CassandraGraphTest extends TitanGraphTest {
+
+ @BeforeClass
+ public static void startCassandra() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+
+ @Override
+ protected boolean isLockingOptimistic() {
+ return true;
+ }
+
+ @Test
+ public void testHasTTL() throws Exception {
+ assertTrue(features.hasCellTTL());
+ }
+
+ @Test
+ public void testGraphConfigUsedByThreadBoundTx() {
+ close();
+ WriteConfiguration wc = getConfiguration();
+ wc.set(ConfigElement.getPath(CASSANDRA_READ_CONSISTENCY), "ALL");
+ wc.set(ConfigElement.getPath(CASSANDRA_WRITE_CONSISTENCY), "LOCAL_QUORUM");
+
+ graph = (StandardTitanGraph) TitanFactory.open(wc);
+
+ StandardTitanTx tx = (StandardTitanTx)graph.getCurrentThreadTx();
+ assertEquals("ALL",
+ tx.getTxHandle().getBaseTransactionConfig().getCustomOptions()
+ .get(AbstractCassandraStoreManager.CASSANDRA_READ_CONSISTENCY));
+ assertEquals("LOCAL_QUORUM",
+ tx.getTxHandle().getBaseTransactionConfig().getCustomOptions()
+ .get(AbstractCassandraStoreManager.CASSANDRA_WRITE_CONSISTENCY));
+ }
+
+ @Test
+ public void testGraphConfigUsedByTx() {
+ close();
+ WriteConfiguration wc = getConfiguration();
+ wc.set(ConfigElement.getPath(CASSANDRA_READ_CONSISTENCY), "TWO");
+ wc.set(ConfigElement.getPath(CASSANDRA_WRITE_CONSISTENCY), "THREE");
+
+ graph = (StandardTitanGraph) TitanFactory.open(wc);
+
+ StandardTitanTx tx = (StandardTitanTx)graph.newTransaction();
+ assertEquals("TWO",
+ tx.getTxHandle().getBaseTransactionConfig().getCustomOptions()
+ .get(AbstractCassandraStoreManager.CASSANDRA_READ_CONSISTENCY));
+ assertEquals("THREE",
+ tx.getTxHandle().getBaseTransactionConfig().getCustomOptions()
+ .get(AbstractCassandraStoreManager.CASSANDRA_WRITE_CONSISTENCY));
+ tx.rollback();
+ }
+
+ @Test
+ public void testCustomConfigUsedByTx() {
+ close();
+ WriteConfiguration wc = getConfiguration();
+ wc.set(ConfigElement.getPath(CASSANDRA_READ_CONSISTENCY), "ALL");
+ wc.set(ConfigElement.getPath(CASSANDRA_WRITE_CONSISTENCY), "ALL");
+
+ graph = (StandardTitanGraph) TitanFactory.open(wc);
+
+ StandardTitanTx tx = (StandardTitanTx)graph.buildTransaction()
+ .customOption(ConfigElement.getPath(CASSANDRA_READ_CONSISTENCY), "ONE")
+ .customOption(ConfigElement.getPath(CASSANDRA_WRITE_CONSISTENCY), "TWO").start();
+
+ assertEquals("ONE",
+ tx.getTxHandle().getBaseTransactionConfig().getCustomOptions()
+ .get(AbstractCassandraStoreManager.CASSANDRA_READ_CONSISTENCY));
+ assertEquals("TWO",
+ tx.getTxHandle().getBaseTransactionConfig().getCustomOptions()
+ .get(AbstractCassandraStoreManager.CASSANDRA_WRITE_CONSISTENCY));
+ tx.rollback();
+ }
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/astyanax/AstyanaxGraphConcurrentTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/astyanax/AstyanaxGraphConcurrentTest.java
new file mode 100644
index 0000000..3a3c0b8
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/astyanax/AstyanaxGraphConcurrentTest.java
@@ -0,0 +1,24 @@
+package com.thinkaurelius.titan.graphdb.astyanax;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.graphdb.TitanGraphConcurrentTest;
+import com.thinkaurelius.titan.testcategory.PerformanceTests;
+
+import org.junit.BeforeClass;
+import org.junit.experimental.categories.Category;
+
+@Category({PerformanceTests.class})
+public class AstyanaxGraphConcurrentTest extends TitanGraphConcurrentTest {
+
+ @BeforeClass
+ public static void startCassandra() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+
+
+ @Override
+ public WriteConfiguration getConfiguration() {
+ return CassandraStorageSetup.getAstyanaxGraphConfiguration(getClass().getSimpleName());
+ }
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/astyanax/AstyanaxGraphPerformanceMemoryTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/astyanax/AstyanaxGraphPerformanceMemoryTest.java
new file mode 100644
index 0000000..c20e837
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/astyanax/AstyanaxGraphPerformanceMemoryTest.java
@@ -0,0 +1,21 @@
+package com.thinkaurelius.titan.graphdb.astyanax;
+
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import org.junit.BeforeClass;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.graphdb.TitanGraphPerformanceMemoryTest;
+
+public class AstyanaxGraphPerformanceMemoryTest extends TitanGraphPerformanceMemoryTest {
+
+ @BeforeClass
+ public static void startCassandra() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+
+ @Override
+ public WriteConfiguration getConfiguration() {
+ return CassandraStorageSetup.getAstyanaxGraphConfiguration(getClass().getSimpleName());
+ }
+
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/astyanax/AstyanaxGraphTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/astyanax/AstyanaxGraphTest.java
new file mode 100644
index 0000000..70f595e
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/astyanax/AstyanaxGraphTest.java
@@ -0,0 +1,13 @@
+package com.thinkaurelius.titan.graphdb.astyanax;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.graphdb.CassandraGraphTest;
+
+public class AstyanaxGraphTest extends CassandraGraphTest {
+
+ @Override
+ public WriteConfiguration getConfiguration() {
+ return CassandraStorageSetup.getAstyanaxGraphConfiguration(getClass().getSimpleName());
+ }
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/astyanax/AstyanaxPartitionGraphTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/astyanax/AstyanaxPartitionGraphTest.java
new file mode 100644
index 0000000..c8fb206
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/astyanax/AstyanaxPartitionGraphTest.java
@@ -0,0 +1,21 @@
+package com.thinkaurelius.titan.graphdb.astyanax;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.graphdb.TitanGraphTest;
+import com.thinkaurelius.titan.graphdb.TitanPartitionGraphTest;
+import org.junit.BeforeClass;
+
+public class AstyanaxPartitionGraphTest extends TitanPartitionGraphTest {
+
+ @BeforeClass
+ public static void startCassandra() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+
+ @Override
+ public WriteConfiguration getBaseConfiguration() {
+ return CassandraStorageSetup.getAstyanaxGraphConfiguration(getClass().getSimpleName());
+ }
+
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedEventualGraphTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedEventualGraphTest.java
new file mode 100644
index 0000000..4a4fc0f
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedEventualGraphTest.java
@@ -0,0 +1,21 @@
+package com.thinkaurelius.titan.graphdb.embedded;
+
+import org.junit.BeforeClass;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.graphdb.TitanEventualGraphTest;
+
+public class EmbeddedEventualGraphTest extends TitanEventualGraphTest {
+
+ @BeforeClass
+ public static void startEmbeddedCassandra() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+
+ @Override
+ public WriteConfiguration getConfiguration() {
+ return CassandraStorageSetup.getEmbeddedCassandraPartitionGraphConfiguration(getClass().getSimpleName());
+ }
+
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedGraphConcurrentTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedGraphConcurrentTest.java
new file mode 100644
index 0000000..35cc582
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedGraphConcurrentTest.java
@@ -0,0 +1,28 @@
+package com.thinkaurelius.titan.graphdb.embedded;
+
+import org.junit.BeforeClass;
+import org.junit.experimental.categories.Category;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.graphdb.TitanGraphConcurrentTest;
+import com.thinkaurelius.titan.testcategory.PerformanceTests;
+
+/**
+ * @author Matthias Broecheler (me@matthiasb.com)
+ */
+
+@Category({PerformanceTests.class})
+public class EmbeddedGraphConcurrentTest extends TitanGraphConcurrentTest {
+
+ @BeforeClass
+ public static void startCassandra() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+
+ @Override
+ public WriteConfiguration getConfiguration() {
+ return CassandraStorageSetup.getEmbeddedCassandraPartitionGraphConfiguration(getClass().getSimpleName());
+ }
+
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedGraphMemoryPerformanceTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedGraphMemoryPerformanceTest.java
new file mode 100644
index 0000000..cd9d75d
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedGraphMemoryPerformanceTest.java
@@ -0,0 +1,25 @@
+package com.thinkaurelius.titan.graphdb.embedded;
+
+import org.junit.BeforeClass;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.graphdb.TitanGraphPerformanceMemoryTest;
+
+/**
+ * @author Matthias Broecheler (me@matthiasb.com)
+ */
+
+public class EmbeddedGraphMemoryPerformanceTest extends TitanGraphPerformanceMemoryTest {
+
+ @BeforeClass
+ public static void startCassandra() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+
+ @Override
+ public WriteConfiguration getConfiguration() {
+ return CassandraStorageSetup.getEmbeddedCassandraPartitionGraphConfiguration(getClass().getSimpleName());
+ }
+
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedGraphTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedGraphTest.java
new file mode 100644
index 0000000..a602e71
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedGraphTest.java
@@ -0,0 +1,13 @@
+package com.thinkaurelius.titan.graphdb.embedded;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.graphdb.CassandraGraphTest;
+
+public class EmbeddedGraphTest extends CassandraGraphTest {
+
+ @Override
+ public WriteConfiguration getConfiguration() {
+ return CassandraStorageSetup.getEmbeddedCassandraPartitionGraphConfiguration(getClass().getSimpleName());
+ }
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedPartitionGraphTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedPartitionGraphTest.java
new file mode 100644
index 0000000..4851b3f
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/embedded/EmbeddedPartitionGraphTest.java
@@ -0,0 +1,21 @@
+package com.thinkaurelius.titan.graphdb.embedded;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.graphdb.TitanEventualGraphTest;
+import com.thinkaurelius.titan.graphdb.TitanPartitionGraphTest;
+import org.junit.BeforeClass;
+
+public class EmbeddedPartitionGraphTest extends TitanPartitionGraphTest {
+
+ @BeforeClass
+ public static void startEmbeddedCassandra() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+
+ @Override
+ public WriteConfiguration getBaseConfiguration() {
+ return CassandraStorageSetup.getEmbeddedCassandraPartitionGraphConfiguration(getClass().getSimpleName());
+ }
+
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftEventualGraphTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftEventualGraphTest.java
new file mode 100644
index 0000000..8fe1362
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftEventualGraphTest.java
@@ -0,0 +1,21 @@
+package com.thinkaurelius.titan.graphdb.thrift;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.graphdb.TitanEventualGraphTest;
+import com.thinkaurelius.titan.graphdb.TitanGraphTest;
+import org.junit.BeforeClass;
+import org.junit.experimental.categories.Category;
+
+public class ThriftEventualGraphTest extends TitanEventualGraphTest {
+
+ @Override
+ public WriteConfiguration getConfiguration() {
+ return CassandraStorageSetup.getCassandraThriftGraphConfiguration(getClass().getSimpleName());
+ }
+
+ @BeforeClass
+ public static void beforeClass() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphCacheTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphCacheTest.java
new file mode 100644
index 0000000..17848d4
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphCacheTest.java
@@ -0,0 +1,28 @@
+package com.thinkaurelius.titan.graphdb.thrift;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.StorageSetup;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.graphdb.TitanGraphTest;
+import org.junit.BeforeClass;
+
+public class ThriftGraphCacheTest extends TitanGraphTest {
+
+ @Override
+ public WriteConfiguration getConfiguration() {
+ return StorageSetup.addPermanentCache(CassandraStorageSetup.getCassandraThriftConfiguration(getClass().getSimpleName()));
+ }
+
+
+ @BeforeClass
+ public static void beforeClass() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+
+
+
+ @Override
+ protected boolean isLockingOptimistic() {
+ return true;
+ }
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphConcurrentTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphConcurrentTest.java
new file mode 100644
index 0000000..f1d4fe4
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphConcurrentTest.java
@@ -0,0 +1,24 @@
+package com.thinkaurelius.titan.graphdb.thrift;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.graphdb.TitanGraphConcurrentTest;
+import com.thinkaurelius.titan.testcategory.PerformanceTests;
+
+import org.junit.BeforeClass;
+import org.junit.experimental.categories.Category;
+
+@Category({PerformanceTests.class})
+public class ThriftGraphConcurrentTest extends TitanGraphConcurrentTest {
+
+ @Override
+ public WriteConfiguration getConfiguration() {
+ return CassandraStorageSetup.getCassandraThriftGraphConfiguration(getClass().getSimpleName());
+ }
+
+
+ @BeforeClass
+ public static void beforeClass() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphIterativeTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphIterativeTest.java
new file mode 100644
index 0000000..dd45c42
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphIterativeTest.java
@@ -0,0 +1,30 @@
+package com.thinkaurelius.titan.graphdb.thrift;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.diskstorage.BackendException;
+import com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftStoreManager;
+import com.thinkaurelius.titan.diskstorage.configuration.BasicConfiguration;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.diskstorage.keycolumnvalue.KeyColumnValueStoreManager;
+import com.thinkaurelius.titan.graphdb.TitanGraphIterativeBenchmark;
+import com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration;
+import org.junit.BeforeClass;
+
+public class ThriftGraphIterativeTest extends TitanGraphIterativeBenchmark {
+
+ @Override
+ public WriteConfiguration getConfiguration() {
+ return CassandraStorageSetup.getCassandraThriftGraphConfiguration(getClass().getSimpleName());
+ }
+
+ @Override
+ public KeyColumnValueStoreManager openStorageManager() throws BackendException {
+ return new CassandraThriftStoreManager(new BasicConfiguration(GraphDatabaseConfiguration.ROOT_NS,getConfiguration(), BasicConfiguration.Restriction.NONE));
+ }
+
+
+ @BeforeClass
+ public static void beforeClass() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphPerformanceMemoryTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphPerformanceMemoryTest.java
new file mode 100644
index 0000000..893b6c8
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphPerformanceMemoryTest.java
@@ -0,0 +1,22 @@
+package com.thinkaurelius.titan.graphdb.thrift;
+
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import org.apache.commons.configuration.Configuration;
+import org.junit.BeforeClass;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.graphdb.TitanGraphPerformanceMemoryTest;
+
+public class ThriftGraphPerformanceMemoryTest extends TitanGraphPerformanceMemoryTest {
+
+ @Override
+ public WriteConfiguration getConfiguration() {
+ return CassandraStorageSetup.getCassandraThriftGraphConfiguration(getClass().getSimpleName());
+ }
+
+
+ @BeforeClass
+ public static void beforeClass() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphSpeedTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphSpeedTest.java
new file mode 100644
index 0000000..6f01f0b
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphSpeedTest.java
@@ -0,0 +1,56 @@
+package com.thinkaurelius.titan.graphdb.thrift;
+
+import com.thinkaurelius.titan.diskstorage.BackendException;
+import com.thinkaurelius.titan.graphdb.SpeedTestSchema;
+import org.junit.BeforeClass;
+import org.junit.experimental.categories.Category;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.core.TitanFactory;
+import com.thinkaurelius.titan.graphdb.TitanGraphSpeedTest;
+import com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration;
+import com.thinkaurelius.titan.graphdb.database.StandardTitanGraph;
+import com.thinkaurelius.titan.testcategory.PerformanceTests;
+
+@Category({PerformanceTests.class})
+public class ThriftGraphSpeedTest extends TitanGraphSpeedTest {
+
+ private static StandardTitanGraph graph;
+ private static SpeedTestSchema schema;
+
+ private static final Logger log =
+ LoggerFactory.getLogger(ThriftGraphSpeedTest.class);
+
+ public ThriftGraphSpeedTest() throws BackendException {
+ super(CassandraStorageSetup.getCassandraThriftGraphConfiguration(ThriftGraphSpeedTest.class.getSimpleName()));
+ }
+
+ @BeforeClass
+ public static void beforeClass() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+
+ @Override
+ protected StandardTitanGraph getGraph() throws BackendException {
+
+
+ if (null == graph) {
+ GraphDatabaseConfiguration graphconfig = new GraphDatabaseConfiguration(conf);
+ graphconfig.getBackend().clearStorage();
+ log.debug("Cleared backend storage");
+ graph = (StandardTitanGraph)TitanFactory.open(conf);
+ initializeGraph(graph);
+ }
+ return graph;
+ }
+
+ @Override
+ protected SpeedTestSchema getSchema() {
+ if (null == schema) {
+ schema = SpeedTestSchema.get();
+ }
+ return schema;
+ }
+} \ No newline at end of file
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphTest.java
new file mode 100644
index 0000000..e9a9ac9
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftGraphTest.java
@@ -0,0 +1,13 @@
+package com.thinkaurelius.titan.graphdb.thrift;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.graphdb.CassandraGraphTest;
+
+public class ThriftGraphTest extends CassandraGraphTest {
+
+ @Override
+ public WriteConfiguration getConfiguration() {
+ return CassandraStorageSetup.getCassandraThriftGraphConfiguration(getClass().getSimpleName());
+ }
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftOLAPTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftOLAPTest.java
new file mode 100644
index 0000000..8679da9
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftOLAPTest.java
@@ -0,0 +1,20 @@
+package com.thinkaurelius.titan.graphdb.thrift;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.olap.OLAPTest;
+import org.junit.BeforeClass;
+
+public class ThriftOLAPTest extends OLAPTest {
+
+ @Override
+ public WriteConfiguration getConfiguration() {
+ return CassandraStorageSetup.getCassandraThriftGraphConfiguration(getClass().getSimpleName());
+ }
+
+
+ @BeforeClass
+ public static void beforeClass() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftOperationCountingTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftOperationCountingTest.java
new file mode 100644
index 0000000..9bae61d
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftOperationCountingTest.java
@@ -0,0 +1,25 @@
+package com.thinkaurelius.titan.graphdb.thrift;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.graphdb.TitanOperationCountingTest;
+import org.junit.BeforeClass;
+
+public class ThriftOperationCountingTest extends TitanOperationCountingTest {
+
+ @BeforeClass
+ public static void beforeClass() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+
+ @Override
+ public WriteConfiguration getBaseConfiguration() {
+ return CassandraStorageSetup.getCassandraThriftGraphConfiguration(getClass().getSimpleName());
+ }
+
+ @Override
+ public boolean storeUsesConsistentKeyLocker() {
+ return true;
+ }
+
+}
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftPartitionGraphTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftPartitionGraphTest.java
new file mode 100644
index 0000000..728e338
--- /dev/null
+++ b/src/test/java/com/thinkaurelius/titan/graphdb/thrift/ThriftPartitionGraphTest.java
@@ -0,0 +1,21 @@
+package com.thinkaurelius.titan.graphdb.thrift;
+
+import com.thinkaurelius.titan.CassandraStorageSetup;
+import com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration;
+import com.thinkaurelius.titan.graphdb.TitanOperationCountingTest;
+import com.thinkaurelius.titan.graphdb.TitanPartitionGraphTest;
+import org.junit.BeforeClass;
+
+public class ThriftPartitionGraphTest extends TitanPartitionGraphTest {
+
+ @BeforeClass
+ public static void beforeClass() {
+ CassandraStorageSetup.startCleanEmbedded();
+ }
+
+ @Override
+ public WriteConfiguration getBaseConfiguration() {
+ return CassandraStorageSetup.getCassandraThriftGraphConfiguration(getClass().getSimpleName());
+ }
+
+}