Fix failing tests after Spring Boot upgrade to 3.2.2

Description

Background:

Tests from src/test/java/org/folio/entlinks/controller/AuthorityControllerIT.java are failing with non-expected value of authority’s version attribute. These failures are only being observed after the upgrade to Spring Boot 3.2.2 which also uses the updated version of Hibernate 6.4.1 final.

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Checklist

hide

Activity

Show:

Mukhiddin Yusupov February 16, 2024 at 9:37 AM

Upgraded Spring-Boot version to 3.2.2 without upgrading Hibernate, so now we have dependency to Hibernate version 6.3.1 Final. Once Hibernate resolves the issue with JsonType, and we will track for now the issue mentioned by me in my previous comment, then we will upgrade it’s version.

Mukhiddin Yusupov February 13, 2024 at 8:24 AM

The investigation has revealed that this issue is most likely related to and comes from the Hibernate framework. What was working with version 6.3.1 final of the framework started to work differently after the upgrade to the version 6.4.1 final (through upgrading to Spring Boot 3.2.2) and out integration tests have detected it. The nature of the issue is as follows: when new authority records are created in DB (insert query) Hibernate updates these records (update query) once the records are created. This is happening as part of the flush operation for the insert. Hibernate performs update because of the dirty checking step which is for some reason detects that four attributes of authority record (identifiers, notes, saftHeadings, sftHeadings and they are stored as json in the DB) are modified.

This issue would not affect authority management logic in terms of the business perspective except for the optimistic locking as version attribute is being incremented twice in above described case.

Similar issue was already reported in hibernate’s issue tracker

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Spitfire

Fix versions

Release

Quesnelia (R1 2024)

RCA Group

Related dependency upgrade

Affected releases

Quesnelia (R1 2024)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created February 5, 2024 at 6:34 AM
Updated February 16, 2024 at 10:08 AM
Resolved February 16, 2024 at 9:38 AM
TestRail: Cases
TestRail: Runs