Skip to content

Commit e210234

Browse files
committed
Upgrade to Hibernate 6.2.22.Final
* Fix JPA test for the latest Hibernate
1 parent 6787662 commit e210234

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ext {
6666
groovyVersion = '4.0.18'
6767
hamcrestVersion = '2.2'
6868
hazelcastVersion = '5.2.4'
69-
hibernateVersion = '6.2.13.Final'
69+
hibernateVersion = '6.2.22.Final'
7070
hsqldbVersion = '2.7.2'
7171
h2Version = '2.2.224'
7272
jacksonVersion = '2.15.3'

spring-integration-jpa/src/test/java/org/springframework/integration/jpa/core/HibernateJpaOperationsTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -207,7 +207,6 @@ public void testMerge() {
207207
entityManager.flush();
208208
assertThat(savedStudent).isNotNull();
209209
assertThat(savedStudent.getRollNumber()).isNotNull();
210-
assertThat(student.getRollNumber()).isEqualTo(savedStudent.getRollNumber());
211210

212211
assertThat(student != savedStudent).isTrue();
213212
}

spring-integration-jpa/src/test/java/org/springframework/integration/jpa/dsl/JpaTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2023 the original author or authors.
2+
* Copyright 2016-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -166,7 +166,6 @@ public void testUpdatingGatewayFlow() {
166166
StudentDomain mergedStudent = (StudentDomain) receive.getPayload();
167167
assertThat(mergedStudent.getFirstName()).isEqualTo(student.getFirstName());
168168
assertThat(mergedStudent.getRollNumber()).isNotNull();
169-
assertThat(student.getRollNumber()).isEqualTo(mergedStudent.getRollNumber());
170169
}
171170

172171
@Test

spring-integration-jpa/src/test/java/org/springframework/integration/jpa/outbound/JpaOutboundChannelAdapterTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -102,7 +102,7 @@ protected void doInTransactionWithoutResult(TransactionStatus status) {
102102
List<?> results2 = this.jdbcTemplate.queryForList("Select * from Student");
103103
assertThat(results2).hasSize(4);
104104

105-
assertThat(testStudent.getRollNumber()).isNotNull();
105+
assertThat(results2.get(0)).extracting("rollNumber").isNotNull();
106106
}
107107

108108
@Test
@@ -134,7 +134,7 @@ protected void doInTransactionWithoutResult(TransactionStatus status) {
134134
List<?> results2 = this.jdbcTemplate.queryForList("Select * from Student");
135135
assertThat(results2).hasSize(4);
136136

137-
assertThat(testStudent.getRollNumber()).isNotNull();
137+
assertThat(results2.get(0)).extracting("rollNumber").isNotNull();
138138
}
139139

140140
@Test

spring-integration-jpa/src/test/java/org/springframework/integration/jpa/outbound/JpaOutboundChannelAdapterTransactionalTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -72,7 +72,7 @@ public void saveEntityWithTransaction() {
7272
.queryForList("Select * from Student");
7373

7474
assertThat(results2).hasSize(4);
75-
assertThat(testStudent.getRollNumber()).isNotNull();
75+
assertThat(results2.get(0)).extracting("rollNumber").isNotNull();
7676
}
7777

7878
}

0 commit comments

Comments
 (0)