upgrade cassandra versions in pom and remove public modifier from default constructor

This commit is contained in:
anna.spanou 2016-09-03 21:13:32 +03:00
parent 13b91a9b04
commit a28f344999
4 changed files with 14 additions and 8 deletions

View File

@ -24,7 +24,7 @@
<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>
<!-- Cassandra -->
<cassandra-driver-core.version>3.0.3</cassandra-driver-core.version>
<cassandra-driver-core.version>3.1.0</cassandra-driver-core.version>
</properties>
<dependencies>
@ -40,9 +40,15 @@
<dependency>
<groupId>org.cassandraunit</groupId>
<artifactId>cassandra-unit</artifactId>
<version>2.2.2.1</version>
<version>3.0.0.1</version>
</dependency>
<!-- This guava version is required for cassandra-unit 3.0.0.1 -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
<!-- logging -->

View File

@ -14,7 +14,7 @@ public class Book {
private String publisher;
public Book() {
Book() {
}

View File

@ -38,7 +38,7 @@ public class BookRepositoryIntegrationTest {
@BeforeClass
public static void init() throws ConfigurationException, TTransportException, IOException, InterruptedException {
// Start an embedded Cassandra Server
EmbeddedCassandraServerHelper.startEmbeddedCassandra();
EmbeddedCassandraServerHelper.startEmbeddedCassandra(20000L);
}
@Before

View File

@ -32,7 +32,7 @@ public class KeyspaceRepositoryIntegrationTest {
@BeforeClass
public static void init() throws ConfigurationException, TTransportException, IOException, InterruptedException {
// Start an embedded Cassandra Server
EmbeddedCassandraServerHelper.startEmbeddedCassandra();
EmbeddedCassandraServerHelper.startEmbeddedCassandra(20000L);
}
@Before
@ -50,7 +50,7 @@ public class KeyspaceRepositoryIntegrationTest {
// ResultSet result = session.execute("SELECT * FROM system_schema.keyspaces WHERE keyspace_name = 'testBaeldungKeyspace';");
ResultSet result = session.execute("SELECT * FROM system.schema_keyspaces;");
ResultSet result = session.execute("SELECT * FROM system_schema.keyspaces;");
// Check if the Keyspace exists in the returned keyspaces.
List<String> matchedKeyspaces = result.all().stream().filter(r -> r.getString(0).equals(keyspaceName.toLowerCase())).map(r -> r.getString(0)).collect(Collectors.toList());
@ -65,7 +65,7 @@ public class KeyspaceRepositoryIntegrationTest {
// schemaRepository.createKeyspace(keyspaceName, "SimpleStrategy", 1);
schemaRepository.deleteKeyspace(keyspaceName);
ResultSet result = session.execute("SELECT * FROM system.schema_keyspaces;");
ResultSet result = session.execute("SELECT * FROM system_schema.keyspaces;");
boolean isKeyspaceCreated = result.all().stream().anyMatch(r -> r.getString(0).equals(keyspaceName.toLowerCase()));
assertFalse(isKeyspaceCreated);
}