Skip to content

#1764 migrate form Junit5 Assertions to AssertJ#1765

Merged
mergify[bot] merged 1 commit intomainfrom
improvement/1764-migrate-tests-to-assertj
Oct 20, 2024
Merged

#1764 migrate form Junit5 Assertions to AssertJ#1765
mergify[bot] merged 1 commit intomainfrom
improvement/1764-migrate-tests-to-assertj

Conversation

@robfrank
Copy link
Copy Markdown
Collaborator

What does this PR do?

This PR migrates all the Junit5 assertions to AssertJ's

Motivation

The main motivation is to modernize the code base while increasing the readability of test code.

Additional Notes

To fix some flaky tests, Awaitility (https://github.com/awaitility/awaitility) is now used

Checklist

  • I have run the build using mvn clean package command
  • My unit tests cover both failure and success scenarios

@robfrank robfrank added the enhancement New feature or request label Oct 19, 2024
@robfrank robfrank self-assigned this Oct 19, 2024
@robfrank robfrank added this to the 24.11.1 milestone Oct 19, 2024
@robfrank robfrank linked an issue Oct 19, 2024 that may be closed by this pull request
@codacy-production
Copy link
Copy Markdown

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (29a0bff) 65144 0 0.00%
Head commit (e26749577c213c59698883253fbf3e17a87a6803) 65144 (+0) 0 (+0) 0.00% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1765) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@robfrank robfrank requested a review from lvca October 19, 2024 15:12
@robfrank robfrank force-pushed the improvement/1764-migrate-tests-to-assertj branch from e267495 to 53edd7d Compare October 19, 2024 16:17
@lvca
Copy link
Copy Markdown
Member

lvca commented Oct 20, 2024

I see there is also the upgrade to Java17, but seems out of scope for this PR.

@robfrank
Copy link
Copy Markdown
Collaborator Author

let me remove the java 17 part

@robfrank robfrank force-pushed the improvement/1764-migrate-tests-to-assertj branch from 0e24563 to 551b1b3 Compare October 20, 2024 07:29
Copy link
Copy Markdown
Member

@lvca lvca left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@mergify mergify Bot merged commit 04dec10 into main Oct 20, 2024
@lvca lvca deleted the improvement/1764-migrate-tests-to-assertj branch June 20, 2025 00:13
mergify Bot added a commit that referenced this pull request Apr 13, 2026
Bumps `jline.version` from 4.0.10 to 4.0.12.
Updates `org.jline:jline-terminal` from 4.0.10 to 4.0.12
Release notes

*Sourced from [org.jline:jline-terminal's releases](https://github.com/jline/jline3/releases).*

> JLine 4.0.12
> ------------
>
> **JLine 4.0.12** is a quick follow-up fixing two regressions. A missing timeout in the forced-dump path caused busy-loop CPU spinning, and an unguarded `AnsiConsole.providers()` call threw `NoSuchMethodError` when running against older Jansi versions.
>
> 🐛 Bug Fixes
> -----------
>
> * fix: restore waitDirty timeout in forced dump to prevent busy-loop spinning (fixes [#1768](https://redirect.github.com/jline/jline3/issues/1768)) ([#1769](https://redirect.github.com/jline/jline3/pull/1769)) [`@​gnodet`](https://github.com/gnodet)
> * fix: guard AnsiConsole.providers() call to avoid NoSuchMethodError (fixes [#1766](https://redirect.github.com/jline/jline3/issues/1766)) ([#1767](https://redirect.github.com/jline/jline3/pull/1767)) [`@​gnodet`](https://github.com/gnodet)
>
> JLine 4.0.11
> ------------
>
> **JLine 4.0.11** improves **SwingTerminal rendering fidelity** and **grapheme cluster performance**. SwingTerminal now correctly renders dim, italic, and conceal attributes and matches the ScreenTerminal HTML color logic. A BreakIterator caching fix eliminates repeated object allocation in grapheme cluster width loops, and a spurious-wakeup guard hardens the ScreenTerminal dirty-wait path.
>
> 🚀 New features and improvements
> -------------------------------
>
> * feat: add direct dump method for ScreenTerminal HTML string ([#1759](https://redirect.github.com/jline/jline3/pull/1759)) [`@​Elec332`](https://github.com/Elec332)
>
> 🐛 Bug Fixes
> -----------
>
> * fix: guard waitDirty against spurious wakeups ([#1765](https://redirect.github.com/jline/jline3/pull/1765)) [`@​gnodet`](https://github.com/gnodet)
> * fix: apply dim and italic attributes in SwingTerminal, fix conceal+dim interaction ([#1758](https://redirect.github.com/jline/jline3/pull/1758)) [`@​Elec332`](https://github.com/Elec332)
> * fix: Match SwingTerminal color logic to new HTML color logic ([#1757](https://redirect.github.com/jline/jline3/pull/1757)) [`@​Elec332`](https://github.com/Elec332)
> * fix: cache BreakIterator in grapheme cluster loops ([#1762](https://redirect.github.com/jline/jline3/issues/1762)) ([#1763](https://redirect.github.com/jline/jline3/pull/1763)) [`@​gnodet`](https://github.com/gnodet)
>
> 📦 Dependency updates
> --------------------
>
> * chore: Bump eu.maveniverse.maven.nisse:extension from 0.8.1 to 0.8.2 ([#1760](https://redirect.github.com/jline/jline3/pull/1760)) [`@​dependabot`](https://github.com/dependabot)
>
> 👻 Maintenance
> -------------
>
> * chore: suppress deprecation warnings in tests for deprecated console API ([#1764](https://redirect.github.com/jline/jline3/pull/1764)) [`@​gnodet`](https://github.com/gnodet)
>
> 🔧 Build
> -------
>
> * fix: update Maven wrapper to 3.9.14 ([#1761](https://redirect.github.com/jline/jline3/pull/1761)) [`@​gnodet`](https://github.com/gnodet)


Commits

* [`eea50e4`](jline/jline3@eea50e4) fix: restore waitDirty timeout in forced dump to prevent busy-loop spinning (...
* [`630eaaf`](jline/jline3@630eaaf) fix: guard AnsiConsole.providers() call to avoid NoSuchMethodError (fixes [#1766](https://redirect.github.com/jline/jline3/issues/1766))
* [`28dd626`](jline/jline3@28dd626) fix: guard waitDirty against spurious wakeups ([#1765](https://redirect.github.com/jline/jline3/issues/1765))
* [`bbe5f1b`](jline/jline3@bbe5f1b) chore: suppress deprecation warnings in tests for deprecated console API ([#1764](https://redirect.github.com/jline/jline3/issues/1764))
* [`e3bba82`](jline/jline3@e3bba82) fix: apply dim and italic attributes in SwingTerminal, fix conceal+dim intera...
* [`97baf7b`](jline/jline3@97baf7b) fix: correct 4-bit to 8-bit color expansion in SwingTerminal (fixes [#1757](https://redirect.github.com/jline/jline3/issues/1757))
* [`5c0f479`](jline/jline3@5c0f479) feat: add direct dump method for ScreenTerminal HTML string ([#1759](https://redirect.github.com/jline/jline3/issues/1759))
* [`529e252`](jline/jline3@529e252) fix: cache BreakIterator in grapheme cluster loops ([#1762](https://redirect.github.com/jline/jline3/issues/1762)) ([#1763](https://redirect.github.com/jline/jline3/issues/1763))
* [`0ffa1a3`](jline/jline3@0ffa1a3) chore: Bump eu.maveniverse.maven.nisse:extension from 0.8.1 to 0.8.2 ([#1760](https://redirect.github.com/jline/jline3/issues/1760))
* [`1301c8d`](jline/jline3@1301c8d) fix: update Maven wrapper to 3.9.14 ([#1761](https://redirect.github.com/jline/jline3/issues/1761))
* See full diff in [compare view](jline/jline3@4.0.10...4.0.12)
  
Updates `org.jline:jline-reader` from 4.0.10 to 4.0.12
Release notes

*Sourced from [org.jline:jline-reader's releases](https://github.com/jline/jline3/releases).*

> JLine 4.0.12
> ------------
>
> **JLine 4.0.12** is a quick follow-up fixing two regressions. A missing timeout in the forced-dump path caused busy-loop CPU spinning, and an unguarded `AnsiConsole.providers()` call threw `NoSuchMethodError` when running against older Jansi versions.
>
> 🐛 Bug Fixes
> -----------
>
> * fix: restore waitDirty timeout in forced dump to prevent busy-loop spinning (fixes [#1768](https://redirect.github.com/jline/jline3/issues/1768)) ([#1769](https://redirect.github.com/jline/jline3/pull/1769)) [`@​gnodet`](https://github.com/gnodet)
> * fix: guard AnsiConsole.providers() call to avoid NoSuchMethodError (fixes [#1766](https://redirect.github.com/jline/jline3/issues/1766)) ([#1767](https://redirect.github.com/jline/jline3/pull/1767)) [`@​gnodet`](https://github.com/gnodet)
>
> JLine 4.0.11
> ------------
>
> **JLine 4.0.11** improves **SwingTerminal rendering fidelity** and **grapheme cluster performance**. SwingTerminal now correctly renders dim, italic, and conceal attributes and matches the ScreenTerminal HTML color logic. A BreakIterator caching fix eliminates repeated object allocation in grapheme cluster width loops, and a spurious-wakeup guard hardens the ScreenTerminal dirty-wait path.
>
> 🚀 New features and improvements
> -------------------------------
>
> * feat: add direct dump method for ScreenTerminal HTML string ([#1759](https://redirect.github.com/jline/jline3/pull/1759)) [`@​Elec332`](https://github.com/Elec332)
>
> 🐛 Bug Fixes
> -----------
>
> * fix: guard waitDirty against spurious wakeups ([#1765](https://redirect.github.com/jline/jline3/pull/1765)) [`@​gnodet`](https://github.com/gnodet)
> * fix: apply dim and italic attributes in SwingTerminal, fix conceal+dim interaction ([#1758](https://redirect.github.com/jline/jline3/pull/1758)) [`@​Elec332`](https://github.com/Elec332)
> * fix: Match SwingTerminal color logic to new HTML color logic ([#1757](https://redirect.github.com/jline/jline3/pull/1757)) [`@​Elec332`](https://github.com/Elec332)
> * fix: cache BreakIterator in grapheme cluster loops ([#1762](https://redirect.github.com/jline/jline3/issues/1762)) ([#1763](https://redirect.github.com/jline/jline3/pull/1763)) [`@​gnodet`](https://github.com/gnodet)
>
> 📦 Dependency updates
> --------------------
>
> * chore: Bump eu.maveniverse.maven.nisse:extension from 0.8.1 to 0.8.2 ([#1760](https://redirect.github.com/jline/jline3/pull/1760)) [`@​dependabot`](https://github.com/dependabot)
>
> 👻 Maintenance
> -------------
>
> * chore: suppress deprecation warnings in tests for deprecated console API ([#1764](https://redirect.github.com/jline/jline3/pull/1764)) [`@​gnodet`](https://github.com/gnodet)
>
> 🔧 Build
> -------
>
> * fix: update Maven wrapper to 3.9.14 ([#1761](https://redirect.github.com/jline/jline3/pull/1761)) [`@​gnodet`](https://github.com/gnodet)


Commits

* [`eea50e4`](jline/jline3@eea50e4) fix: restore waitDirty timeout in forced dump to prevent busy-loop spinning (...
* [`630eaaf`](jline/jline3@630eaaf) fix: guard AnsiConsole.providers() call to avoid NoSuchMethodError (fixes [#1766](https://redirect.github.com/jline/jline3/issues/1766))
* [`28dd626`](jline/jline3@28dd626) fix: guard waitDirty against spurious wakeups ([#1765](https://redirect.github.com/jline/jline3/issues/1765))
* [`bbe5f1b`](jline/jline3@bbe5f1b) chore: suppress deprecation warnings in tests for deprecated console API ([#1764](https://redirect.github.com/jline/jline3/issues/1764))
* [`e3bba82`](jline/jline3@e3bba82) fix: apply dim and italic attributes in SwingTerminal, fix conceal+dim intera...
* [`97baf7b`](jline/jline3@97baf7b) fix: correct 4-bit to 8-bit color expansion in SwingTerminal (fixes [#1757](https://redirect.github.com/jline/jline3/issues/1757))
* [`5c0f479`](jline/jline3@5c0f479) feat: add direct dump method for ScreenTerminal HTML string ([#1759](https://redirect.github.com/jline/jline3/issues/1759))
* [`529e252`](jline/jline3@529e252) fix: cache BreakIterator in grapheme cluster loops ([#1762](https://redirect.github.com/jline/jline3/issues/1762)) ([#1763](https://redirect.github.com/jline/jline3/issues/1763))
* [`0ffa1a3`](jline/jline3@0ffa1a3) chore: Bump eu.maveniverse.maven.nisse:extension from 0.8.1 to 0.8.2 ([#1760](https://redirect.github.com/jline/jline3/issues/1760))
* [`1301c8d`](jline/jline3@1301c8d) fix: update Maven wrapper to 3.9.14 ([#1761](https://redirect.github.com/jline/jline3/issues/1761))
* See full diff in [compare view](jline/jline3@4.0.10...4.0.12)
  
Updates `org.jline:jline-terminal-jni` from 4.0.10 to 4.0.12
Release notes

*Sourced from [org.jline:jline-terminal-jni's releases](https://github.com/jline/jline3/releases).*

> JLine 4.0.12
> ------------
>
> **JLine 4.0.12** is a quick follow-up fixing two regressions. A missing timeout in the forced-dump path caused busy-loop CPU spinning, and an unguarded `AnsiConsole.providers()` call threw `NoSuchMethodError` when running against older Jansi versions.
>
> 🐛 Bug Fixes
> -----------
>
> * fix: restore waitDirty timeout in forced dump to prevent busy-loop spinning (fixes [#1768](https://redirect.github.com/jline/jline3/issues/1768)) ([#1769](https://redirect.github.com/jline/jline3/pull/1769)) [`@​gnodet`](https://github.com/gnodet)
> * fix: guard AnsiConsole.providers() call to avoid NoSuchMethodError (fixes [#1766](https://redirect.github.com/jline/jline3/issues/1766)) ([#1767](https://redirect.github.com/jline/jline3/pull/1767)) [`@​gnodet`](https://github.com/gnodet)
>
> JLine 4.0.11
> ------------
>
> **JLine 4.0.11** improves **SwingTerminal rendering fidelity** and **grapheme cluster performance**. SwingTerminal now correctly renders dim, italic, and conceal attributes and matches the ScreenTerminal HTML color logic. A BreakIterator caching fix eliminates repeated object allocation in grapheme cluster width loops, and a spurious-wakeup guard hardens the ScreenTerminal dirty-wait path.
>
> 🚀 New features and improvements
> -------------------------------
>
> * feat: add direct dump method for ScreenTerminal HTML string ([#1759](https://redirect.github.com/jline/jline3/pull/1759)) [`@​Elec332`](https://github.com/Elec332)
>
> 🐛 Bug Fixes
> -----------
>
> * fix: guard waitDirty against spurious wakeups ([#1765](https://redirect.github.com/jline/jline3/pull/1765)) [`@​gnodet`](https://github.com/gnodet)
> * fix: apply dim and italic attributes in SwingTerminal, fix conceal+dim interaction ([#1758](https://redirect.github.com/jline/jline3/pull/1758)) [`@​Elec332`](https://github.com/Elec332)
> * fix: Match SwingTerminal color logic to new HTML color logic ([#1757](https://redirect.github.com/jline/jline3/pull/1757)) [`@​Elec332`](https://github.com/Elec332)
> * fix: cache BreakIterator in grapheme cluster loops ([#1762](https://redirect.github.com/jline/jline3/issues/1762)) ([#1763](https://redirect.github.com/jline/jline3/pull/1763)) [`@​gnodet`](https://github.com/gnodet)
>
> 📦 Dependency updates
> --------------------
>
> * chore: Bump eu.maveniverse.maven.nisse:extension from 0.8.1 to 0.8.2 ([#1760](https://redirect.github.com/jline/jline3/pull/1760)) [`@​dependabot`](https://github.com/dependabot)
>
> 👻 Maintenance
> -------------
>
> * chore: suppress deprecation warnings in tests for deprecated console API ([#1764](https://redirect.github.com/jline/jline3/pull/1764)) [`@​gnodet`](https://github.com/gnodet)
>
> 🔧 Build
> -------
>
> * fix: update Maven wrapper to 3.9.14 ([#1761](https://redirect.github.com/jline/jline3/pull/1761)) [`@​gnodet`](https://github.com/gnodet)


Commits

* [`eea50e4`](jline/jline3@eea50e4) fix: restore waitDirty timeout in forced dump to prevent busy-loop spinning (...
* [`630eaaf`](jline/jline3@630eaaf) fix: guard AnsiConsole.providers() call to avoid NoSuchMethodError (fixes [#1766](https://redirect.github.com/jline/jline3/issues/1766))
* [`28dd626`](jline/jline3@28dd626) fix: guard waitDirty against spurious wakeups ([#1765](https://redirect.github.com/jline/jline3/issues/1765))
* [`bbe5f1b`](jline/jline3@bbe5f1b) chore: suppress deprecation warnings in tests for deprecated console API ([#1764](https://redirect.github.com/jline/jline3/issues/1764))
* [`e3bba82`](jline/jline3@e3bba82) fix: apply dim and italic attributes in SwingTerminal, fix conceal+dim intera...
* [`97baf7b`](jline/jline3@97baf7b) fix: correct 4-bit to 8-bit color expansion in SwingTerminal (fixes [#1757](https://redirect.github.com/jline/jline3/issues/1757))
* [`5c0f479`](jline/jline3@5c0f479) feat: add direct dump method for ScreenTerminal HTML string ([#1759](https://redirect.github.com/jline/jline3/issues/1759))
* [`529e252`](jline/jline3@529e252) fix: cache BreakIterator in grapheme cluster loops ([#1762](https://redirect.github.com/jline/jline3/issues/1762)) ([#1763](https://redirect.github.com/jline/jline3/issues/1763))
* [`0ffa1a3`](jline/jline3@0ffa1a3) chore: Bump eu.maveniverse.maven.nisse:extension from 0.8.1 to 0.8.2 ([#1760](https://redirect.github.com/jline/jline3/issues/1760))
* [`1301c8d`](jline/jline3@1301c8d) fix: update Maven wrapper to 3.9.14 ([#1761](https://redirect.github.com/jline/jline3/issues/1761))
* See full diff in [compare view](jline/jline3@4.0.10...4.0.12)
  
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modernization: migrate to assertj

2 participants