Skip to content

Commit cd368ca

Browse files
authored
Merge pull request eugenp#8114 from dkapil/task/BAEL-18211_2
BAEL-18211 Fix the integrations tests in spring-5-data-reactive
2 parents 11e3498 + 53887eb commit cd368ca

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

spring-5-data-reactive/src/main/java/com/baeldung/r2dbc/configuration/R2DBCConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import org.springframework.data.r2dbc.repository.config.EnableR2dbcRepositories;
99

1010
@Configuration
11-
//@EnableR2dbcRepositories(basePackages = "com.baeldung.r2dbc.repository")
11+
@EnableR2dbcRepositories(basePackages = "com.baeldung.r2dbc.repository")
1212
public class R2DBCConfiguration extends AbstractR2dbcConfiguration {
1313
@Bean
1414
public H2ConnectionFactory connectionFactory() {

spring-5-data-reactive/src/main/java/com/baeldung/r2dbc/model/Player.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
import lombok.Data;
55
import lombok.NoArgsConstructor;
66
import org.springframework.data.annotation.Id;
7+
import org.springframework.data.relational.core.mapping.Table;
78

89
@Data
910
@NoArgsConstructor
1011
@AllArgsConstructor
12+
@Table
1113
public class Player {
1214
@Id
1315
Integer id;

spring-5-data-reactive/src/test/java/com/baeldung/r2dbc/R2dbcApplicationIntegrationTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ public void whenBatchHas2Operations_then2AreExpected() {
111111

112112
private void insertPlayers() {
113113
List<Player> players = Arrays.asList(
114-
new Player(1, "Kaka", 37),
115-
new Player(2, "Messi", 32),
116-
new Player(3, "Mbappé", 20),
117-
new Player(4, "CR7", 34),
118-
new Player(5, "Lewandowski", 30),
119-
new Player(6, "Cavani", 32)
114+
new Player(null, "Kaka", 37),
115+
new Player(null, "Messi", 32),
116+
new Player(null, "Mbappé", 20),
117+
new Player(null, "CR7", 34),
118+
new Player(null, "Lewandowski", 30),
119+
new Player(null, "Cavani", 32)
120120
);
121121

122122
playerRepository.saveAll(players).subscribe();

0 commit comments

Comments
 (0)