Skip to content

Fix unit tests in latest BOM builds#1542

Merged
basil merged 4 commits intojenkinsci:masterfrom
jtnord:jackson2-api-update
Apr 14, 2025
Merged

Fix unit tests in latest BOM builds#1542
basil merged 4 commits intojenkinsci:masterfrom
jtnord:jackson2-api-update

Conversation

@jtnord
Copy link
Copy Markdown
Member

@jtnord jtnord commented Apr 14, 2025

jenkinsci/jackson2-api-plugin#272 (comment)

spock has the ability to switch the library used for mocking based on its classpath.
So remove the obsolete cg-lib library and add byte-buddy (transitivly)

Testing done

Tested in CI, validated that the tests failed when using the latest jackson2 version, and pass with the fix.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

jtnord added 2 commits April 14, 2025 15:27
cg-lib is a dead project that does not support recent JDK versions.

This switches to create stubs in spock with byte-buddy.  The PR does not
directly depend on byte-buddy but rather obtains it transitively via the
managed dependency of mockito in the plugin-pom.

This allows it to be kept more up-to-data and in a compatable version
(as it also brings in the Objenisis version at a know good version).
@jtnord jtnord changed the title override jackson2-api Fix unit tests in latest bom builds Apr 14, 2025
@jtnord jtnord marked this pull request as ready for review April 14, 2025 16:37
@jtnord jtnord requested a review from a team as a code owner April 14, 2025 16:37
@basil basil added the test label Apr 14, 2025
@basil basil changed the title Fix unit tests in latest bom builds Fix unit tests in latest BOM builds Apr 14, 2025
Copy link
Copy Markdown
Member

@basil basil left a comment

Choose a reason for hiding this comment

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

Thanks!

@basil basil merged commit 0fc01b3 into jenkinsci:master Apr 14, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants