#224 - Use external or embedded (if external Apache Cassandra is not available) for Cassandra examples.

We now check whether an external Apache Cassandra instance is available at localhost:9042 and use it to run the examples. Otherwise, if no external Apache Cassandra instance is available, we start an embedded Cassandra instance.
This commit is contained in:
Mark Paluch
2017-01-04 10:59:14 +01:00
committed by Oliver Gierke
parent 1d3af17572
commit d9f77903ef
21 changed files with 1081 additions and 213 deletions

View File

@@ -18,7 +18,7 @@ package example.springdata.cassandra.people;
import static com.datastax.driver.core.querybuilder.QueryBuilder.*;
import static org.assertj.core.api.Assertions.*;
import example.springdata.cassandra.util.RequiresCassandraKeyspace;
import example.springdata.cassandra.util.CassandraKeyspace;
import reactor.core.publisher.Flux;
import rx.RxReactiveStreams;
@@ -42,7 +42,7 @@ import org.springframework.test.context.junit4.SpringRunner;
@SpringBootTest
public class ReactiveCassandraTemplateIntegrationTest {
@ClassRule public final static RequiresCassandraKeyspace CASSANDRA_KEYSPACE = RequiresCassandraKeyspace.onLocalhost();
@ClassRule public final static CassandraKeyspace CASSANDRA_KEYSPACE = CassandraKeyspace.onLocalhost();
@Autowired ReactiveCassandraTemplate template;

View File

@@ -17,7 +17,7 @@ package example.springdata.cassandra.people;
import static org.assertj.core.api.Assertions.*;
import example.springdata.cassandra.util.RequiresCassandraKeyspace;
import example.springdata.cassandra.util.CassandraKeyspace;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -41,7 +41,7 @@ import org.springframework.test.context.junit4.SpringRunner;
@SpringBootTest
public class ReactivePersonRepositoryIntegrationTest {
@ClassRule public final static RequiresCassandraKeyspace CASSANDRA_KEYSPACE = RequiresCassandraKeyspace.onLocalhost();
@ClassRule public final static CassandraKeyspace CASSANDRA_KEYSPACE = CassandraKeyspace.onLocalhost();
@Autowired ReactivePersonRepository repository;

View File

@@ -17,7 +17,7 @@ package example.springdata.cassandra.people;
import static org.assertj.core.api.Assertions.*;
import example.springdata.cassandra.util.RequiresCassandraKeyspace;
import example.springdata.cassandra.util.CassandraKeyspace;
import rx.Completable;
import rx.Observable;
import rx.Single;
@@ -45,7 +45,7 @@ import org.springframework.test.context.junit4.SpringRunner;
@SpringBootTest
public class RxJava1PersonRepositoryIntegrationTest {
@ClassRule public final static RequiresCassandraKeyspace CASSANDRA_KEYSPACE = RequiresCassandraKeyspace.onLocalhost();
@ClassRule public final static CassandraKeyspace CASSANDRA_KEYSPACE = CassandraKeyspace.onLocalhost();
@Autowired RxJava1PersonRepository repository;
@Autowired ReactiveCassandraOperations operations;