Skip to content

Commit a28f344

Browse files
committed
upgrade cassandra versions in pom and remove public modifier from default constructor
1 parent 13b91a9 commit a28f344

4 files changed

Lines changed: 14 additions & 8 deletions

File tree

‎java-cassandra/pom.xml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>
2525

2626
<!-- Cassandra -->
27-
<cassandra-driver-core.version>3.0.3</cassandra-driver-core.version>
27+
<cassandra-driver-core.version>3.1.0</cassandra-driver-core.version>
2828
</properties>
2929

3030
<dependencies>
@@ -40,10 +40,16 @@
4040
<dependency>
4141
<groupId>org.cassandraunit</groupId>
4242
<artifactId>cassandra-unit</artifactId>
43-
<version>2.2.2.1</version>
43+
<version>3.0.0.1</version>
4444
</dependency>
4545

46-
46+
<!-- This guava version is required for cassandra-unit 3.0.0.1 -->
47+
<dependency>
48+
<groupId>com.google.guava</groupId>
49+
<artifactId>guava</artifactId>
50+
<version>19.0</version>
51+
</dependency>
52+
4753
<!-- logging -->
4854

4955
<dependency>

‎java-cassandra/src/main/java/com/baeldung/cassandra/java/client/domain/Book.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class Book {
1414

1515
private String publisher;
1616

17-
public Book() {
17+
Book() {
1818

1919
}
2020

‎java-cassandra/src/test/java/com/baeldung/cassandra/java/client/repository/BookRepositoryIntegrationTest.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class BookRepositoryIntegrationTest {
3838
@BeforeClass
3939
public static void init() throws ConfigurationException, TTransportException, IOException, InterruptedException {
4040
// Start an embedded Cassandra Server
41-
EmbeddedCassandraServerHelper.startEmbeddedCassandra();
41+
EmbeddedCassandraServerHelper.startEmbeddedCassandra(20000L);
4242
}
4343

4444
@Before

‎java-cassandra/src/test/java/com/baeldung/cassandra/java/client/repository/KeyspaceRepositoryIntegrationTest.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class KeyspaceRepositoryIntegrationTest {
3232
@BeforeClass
3333
public static void init() throws ConfigurationException, TTransportException, IOException, InterruptedException {
3434
// Start an embedded Cassandra Server
35-
EmbeddedCassandraServerHelper.startEmbeddedCassandra();
35+
EmbeddedCassandraServerHelper.startEmbeddedCassandra(20000L);
3636
}
3737

3838
@Before
@@ -50,7 +50,7 @@ public void whenCreatingAKeyspace_thenCreated() {
5050

5151
// ResultSet result = session.execute("SELECT * FROM system_schema.keyspaces WHERE keyspace_name = 'testBaeldungKeyspace';");
5252

53-
ResultSet result = session.execute("SELECT * FROM system.schema_keyspaces;");
53+
ResultSet result = session.execute("SELECT * FROM system_schema.keyspaces;");
5454

5555
// Check if the Keyspace exists in the returned keyspaces.
5656
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 void whenDeletingAKeyspace_thenDoesNotExist() {
6565
// schemaRepository.createKeyspace(keyspaceName, "SimpleStrategy", 1);
6666
schemaRepository.deleteKeyspace(keyspaceName);
6767

68-
ResultSet result = session.execute("SELECT * FROM system.schema_keyspaces;");
68+
ResultSet result = session.execute("SELECT * FROM system_schema.keyspaces;");
6969
boolean isKeyspaceCreated = result.all().stream().anyMatch(r -> r.getString(0).equals(keyspaceName.toLowerCase()));
7070
assertFalse(isKeyspaceCreated);
7171
}

0 commit comments

Comments
 (0)