@Override protected List<TestRule> testRules() { if (GraknTestUtil.usingJanus()) { return ImmutableList.of(EmbeddedCassandraContext.create()); } else { return ImmutableList.of(); } }
public static boolean canUseTx() { return !GraknTestUtil.usingJanus() || EmbeddedCassandraContext.inCassandraContext(); }
public GraknSession newSession() { GraknSession session = (GraknTestUtil.usingJanus()) ? EmbeddedGraknSession.createEngineSession(randomKeyspace()) : EmbeddedGraknSession.inMemory(randomKeyspace()); openedSessions.add(session); return session; }