Skip to content

Commit ea089be

Browse files
committed
DATAJDBC-346 - Polishing.
Original pull request: #144.
1 parent 1481803 commit ea089be

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/ImmutableAggregateTemplateHsqlIntegrationTests.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
*/
1616
package org.springframework.data.jdbc.core;
1717

18-
import static java.util.Collections.singletonList;
19-
import static org.assertj.core.api.Assertions.assertThat;
20-
import static org.assertj.core.api.Assertions.tuple;
18+
import static java.util.Collections.*;
19+
import static org.assertj.core.api.Assertions.*;
2120

2221
import lombok.Value;
2322
import lombok.experimental.Wither;
23+
2424
import org.assertj.core.api.SoftAssertions;
2525
import org.junit.ClassRule;
2626
import org.junit.Rule;
@@ -44,6 +44,7 @@
4444
* Integration tests for {@link JdbcAggregateTemplate} and it's handling of immutable entities.
4545
*
4646
* @author Jens Schauder
47+
* @author Salim Achouche
4748
*/
4849
@ContextConfiguration
4950
@Transactional

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCrossAggregateHsqlIntegrationTests.java

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
* Very simple use cases for creation and usage of JdbcRepositories.
4545
*
4646
* @author Jens Schauder
47+
* @author Salim Achouche
48+
* @author Salim Achouche
4749
*/
4850
@ContextConfiguration
4951
@Transactional

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/config/EnableJdbcAuditingHsqlIntegrationTests.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
*
5050
* @author Kazuki Shimizu
5151
* @author Jens Schauder
52+
* @author Salim Achouche
5253
*/
5354
@ActiveProfiles("hsql")
5455
public class EnableJdbcAuditingHsqlIntegrationTests {
@@ -193,10 +194,8 @@ private <T, R extends CrudRepository<T, Long>> Consumer<Consumer<R>> configureRe
193194

194195
return (Consumer<R> test) -> {
195196

196-
try (AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext()) {
197-
context.getEnvironment().setActiveProfiles("hsql");
198-
context.register(configurationClasses);
199-
context.refresh();
197+
try (ConfigurableApplicationContext context = new AnnotationConfigApplicationContext(configurationClasses)) {
198+
200199
test.accept(context.getBean(repositoryType));
201200

202201
softly.assertAll();
@@ -238,7 +237,6 @@ static class DummyEntity {
238237

239238
@ComponentScan("org.springframework.data.jdbc.testing")
240239
@EnableJdbcRepositories(considerNestedRepositories = true)
241-
@ActiveProfiles("hsql")
242240
static class TestConfiguration {
243241

244242
@Bean

0 commit comments

Comments
 (0)