Skip to content

Commit cf85daa

Browse files
committed
Enhance test configuration and logging
- Updated `build.gradle` to set `testClassesDirs` and `classpath` for the test task. - Refactored `bootstrapHosts` property in integration tests to use the updated connection string property. - Changed logging level for `org.couchbase.quickstart.springdata.controllers` to DEBUG in `logback-test.xml` for improved test logging. These changes improve test execution and logging clarity.
1 parent 4cad947 commit cf85daa

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,7 @@ dependencies {
4444

4545
tasks.named('test') {
4646
useJUnitPlatform()
47+
testClassesDirs = sourceSets.test.output.classesDirs
48+
classpath = sourceSets.test.runtimeClasspath
4749
}
4850

src/test/java/org/couchbase/quickstart/springdata/controllers/AirlineIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class AirlineIntegrationTest {
3030
@Value("${local.server.port}")
3131
private int port;
3232

33-
@Value("#{systemEnvironment['DB_CONN_STR'] ?: '${spring.couchbase.bootstrap-hosts:localhost}'}")
33+
@Value("#{systemEnvironment['DB_CONN_STR'] ?: '${spring.couchbase.connection-string:localhost}'}")
3434
private String bootstrapHosts;
3535

3636
@Autowired

src/test/java/org/couchbase/quickstart/springdata/controllers/AirportIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class AirportIntegrationTest {
3232
@Value("${local.server.port}")
3333
private int port;
3434

35-
@Value("#{systemEnvironment['DB_CONN_STR'] ?: '${spring.couchbase.bootstrap-hosts:localhost}'}")
35+
@Value("#{systemEnvironment['DB_CONN_STR'] ?: '${spring.couchbase.connection-string:localhost}'}")
3636
private String bootstrapHosts;
3737

3838
@Autowired

src/test/java/org/couchbase/quickstart/springdata/controllers/RouteIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class RouteIntegrationTest {
3232
@Value("${local.server.port}")
3333
private int port;
3434

35-
@Value("#{systemEnvironment['DB_CONN_STR'] ?: '${spring.couchbase.bootstrap-hosts:localhost}'}")
35+
@Value("#{systemEnvironment['DB_CONN_STR'] ?: '${spring.couchbase.connection-string:localhost}'}")
3636
private String bootstrapHosts;
3737

3838
@Autowired

src/test/resources/logback-test.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<logger name="org.couchbase.quickstart.springdata" level="INFO"/>
4242

4343
<!-- Show test-related logs for debugging when needed -->
44-
<logger name="org.couchbase.quickstart.springdata.controllers" level="WARN"/>
44+
<logger name="org.couchbase.quickstart.springdata.controllers" level="DEBUG"/>
4545

4646
<!-- Suppress JVM warnings -->
4747
<logger name="jdk.internal" level="ERROR"/>

0 commit comments

Comments
 (0)