Commit b1907a33 by Ashutosh Mestry

ATLAS-2470 - JanusGraph Cassandra. Unit test setup update #2.

parent d88223bc
...@@ -40,15 +40,19 @@ public class CassandraAuditRepositoryTest extends AuditRepositoryTestBase { ...@@ -40,15 +40,19 @@ public class CassandraAuditRepositoryTest extends AuditRepositoryTestBase {
private final int CLUSTER_PORT = 9042; private final int CLUSTER_PORT = 9042;
@BeforeClass @BeforeClass
public void setup() throws InterruptedException, TTransportException, ConfigurationException, IOException, public void setup() {
AtlasException { try {
EmbeddedCassandraServerHelper.startEmbeddedCassandra("cassandra_test.yml"); EmbeddedCassandraServerHelper.startEmbeddedCassandra("cassandra_test.yml");
eventRepository = new CassandraBasedAuditRepository(); eventRepository = new CassandraBasedAuditRepository();
Configuration atlasConf = new MapConfiguration(getClusterProperties()); Configuration atlasConf = new MapConfiguration(getClusterProperties());
((CassandraBasedAuditRepository) eventRepository).setApplicationProperties(atlasConf); ((CassandraBasedAuditRepository) eventRepository).setApplicationProperties(atlasConf);
((CassandraBasedAuditRepository) eventRepository).start(); ((CassandraBasedAuditRepository) eventRepository).start();
ensureClusterCreation(); ensureClusterCreation();
}
catch (Exception ex) {
throw new SkipException("setup: failed!", ex);
}
} }
private Map<String, Object> getClusterProperties() { private Map<String, Object> getClusterProperties() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment