Skip to content

fix(tests): Ensure mutable map deserialization#2791

Merged
kthoms merged 1 commit into
mainfrom
fixes/engine-rest-test
Apr 22, 2026
Merged

fix(tests): Ensure mutable map deserialization#2791
kthoms merged 1 commit into
mainfrom
fixes/engine-rest-test

Conversation

@kthoms

@kthoms kthoms commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

feel-engine 1.21.0 (scala-shaded) now ships META-INF/services/ com.fasterxml.jackson.databind.Module registering DefaultScalaModule. REST Assured's DefaultJackson2ObjectMapperFactory calls ObjectMapper.findAndRegisterModules(), which auto-discovers this module and causes Jackson to deserialize JSON objects as Scala immutable maps instead of java.util.LinkedHashMap.

Fix by configuring REST Assured in AbstractRestServiceTest to use a plain ObjectMapper() without auto-registering modules, restoring the pre-1.21.0 deserialization behavior.

Fixes failures in:

  • DeploymentRestServiceInteractionTest#testGetDeploymentResources
  • ProcessInstanceRestServiceInteractionTest#testGetProcessInstanceComments
  • TaskRestServiceInteractionTest#testGetTaskAttachments
  • TaskRestServiceInteractionTest#testGetTaskComments

Copilot AI review requested due to automatic review settings April 22, 2026 01:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adjusts REST Assured test configuration to avoid unintended Jackson module auto-discovery (introduced via shaded Scala module), restoring Java LinkedHashMap deserialization behavior for JSON objects.

Changes:

  • Configure REST Assured with a plain ObjectMapper (no findAndRegisterModules()).
  • Add REST Assured ObjectMapperConfig setup in AbstractRestServiceTest.

feel-engine 1.21.0 (scala-shaded) now ships META-INF/services/
com.fasterxml.jackson.databind.Module registering DefaultScalaModule.
REST Assured's DefaultJackson2ObjectMapperFactory calls
ObjectMapper.findAndRegisterModules(), which auto-discovers this
module and causes Jackson to deserialize JSON objects as Scala
immutable maps instead of java.util.LinkedHashMap.

Fix by configuring REST Assured in AbstractRestServiceTest to use a
plain ObjectMapper() without auto-registering modules, restoring the
pre-1.21.0 deserialization behavior.

Fixes failures in:
- DeploymentRestServiceInteractionTest#testGetDeploymentResources
- ProcessInstanceRestServiceInteractionTest#testGetProcessInstanceComments
- TaskRestServiceInteractionTest#testGetTaskAttachments
- TaskRestServiceInteractionTest#testGetTaskComments

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kthoms kthoms force-pushed the fixes/engine-rest-test branch from 7e103b4 to 44f9a97 Compare April 22, 2026 02:39
@sonarqubecloud

Copy link
Copy Markdown

@kthoms kthoms merged commit 27d2188 into main Apr 22, 2026
16 checks passed
@kthoms kthoms added this to the 2.1.0 milestone Apr 22, 2026
@kthoms kthoms added the scope:tests Changes affecting only test code label Apr 22, 2026
@kthoms kthoms deleted the fixes/engine-rest-test branch April 22, 2026 20:24
@kthoms

kthoms commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

related to #2794

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:tests Changes affecting only test code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants