Skip to content

Commit

Permalink
Upgrade to Hibernate 6.2.22.Final
Browse files Browse the repository at this point in the history
* Fix JPA test for the latest Hibernate
  • Loading branch information
artembilan committed Feb 16, 2024
1 parent 6787662 commit e210234
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ext {
groovyVersion = '4.0.18'
hamcrestVersion = '2.2'
hazelcastVersion = '5.2.4'
hibernateVersion = '6.2.13.Final'
hibernateVersion = '6.2.22.Final'
hsqldbVersion = '2.7.2'
h2Version = '2.2.224'
jacksonVersion = '2.15.3'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -207,7 +207,6 @@ public void testMerge() {
entityManager.flush();
assertThat(savedStudent).isNotNull();
assertThat(savedStudent.getRollNumber()).isNotNull();
assertThat(student.getRollNumber()).isEqualTo(savedStudent.getRollNumber());

assertThat(student != savedStudent).isTrue();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2023 the original author or authors.
* Copyright 2016-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -166,7 +166,6 @@ public void testUpdatingGatewayFlow() {
StudentDomain mergedStudent = (StudentDomain) receive.getPayload();
assertThat(mergedStudent.getFirstName()).isEqualTo(student.getFirstName());
assertThat(mergedStudent.getRollNumber()).isNotNull();
assertThat(student.getRollNumber()).isEqualTo(mergedStudent.getRollNumber());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -102,7 +102,7 @@ protected void doInTransactionWithoutResult(TransactionStatus status) {
List<?> results2 = this.jdbcTemplate.queryForList("Select * from Student");
assertThat(results2).hasSize(4);

assertThat(testStudent.getRollNumber()).isNotNull();
assertThat(results2.get(0)).extracting("rollNumber").isNotNull();
}

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

assertThat(testStudent.getRollNumber()).isNotNull();
assertThat(results2.get(0)).extracting("rollNumber").isNotNull();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -72,7 +72,7 @@ public void saveEntityWithTransaction() {
.queryForList("Select * from Student");

assertThat(results2).hasSize(4);
assertThat(testStudent.getRollNumber()).isNotNull();
assertThat(results2.get(0)).extracting("rollNumber").isNotNull();
}

}

0 comments on commit e210234

Please sign in to comment.