This repository was archived by the owner on Sep 2, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
src/main/kotlin/com/asarkar/spring/test Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 22
33Starts the Cassandra server and makes the ports available as Spring Boot environment properties.
44
5- Requires Java 8 or later, and Spring Boot.
5+ Requires Java 8 or later. Uses [ cassandra-unit ] ( https://github.com/jsevellec/cassandra-unit ) and [ Spring Boot] ( https://spring.io/projects/spring-boot ) .
66
77## Installation
88
@@ -12,7 +12,7 @@ It is also on Maven Central and jcenter.
1212
1313## Usage
1414
15- To start the server using random ports :
15+ The only thing you need is the ` AutoConfigureCassandraUnit ` annotation :
1616
1717```
1818@SpringBootTest
@@ -32,6 +32,8 @@ public class AutoConfigureWithRandomPortsTest {
3232}
3333```
3434
35+ See KDoc for more details.
36+
3537Note that CassandraUnit can only run one Cassandra instance per JVM; thus, if ` AutoConfigureCassandraUnit ` annotation
3638is present on more than one test classes, only the first one is used, the others are ignored. That means the port
3739properties will not change once a Cassandra instance is started.
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ ktlintVersion=9.4.0
1010bintrayPluginVersion =1.8.5
1111
1212projectGroup =com.asarkar.spring
13- projectVersion =1.0.5
13+ projectVersion =1.0.6
1414projectDescription =Starts the Cassandra server and makes the ports available as Spring Boot environment properties
1515licenseName =Apache-2.0
1616licenseUrl =http://www.apache.org/licenses/LICENSE-2.0.txt
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ import java.lang.annotation.Inherited
1010 * Annotation for test classes that want to start a Cassandra server as part of the Spring application Context.
1111 * Note that CassandraUnit can only run one Cassandra instance per JVM; thus, if this annotation is present on
1212 * more than one test classes, only the first one is used, the others are ignored.
13- * @property config the configuration file.
14- * @property timeout start timeout in milliseconds.
13+ * @property config the configuration file. Defaults to `org.cassandraunit.utils.EmbeddedCassandraServerHelper.DEFAULT_CASSANDRA_YML_FILE`.
14+ * @property timeout start timeout in milliseconds. Defaults to `org.cassandraunit.utils.EmbeddedCassandraServerHelper.DEFAULT_STARTUP_TIMEOUT`.
1515 *
1616 * @author Abhijit Sarkar
1717 * @since 1.0.0
You can’t perform that action at this time.
0 commit comments