Exposing getIfPresent in the CaffeineCache
Fixes #26730.
Implemented the exposure of the getIfPresent from the CaffeineCache, as described in the #26730.
As this is my first PR, I tried to follow which test(s) should be updated by looking at references to the CaffeineCache#keySet() and the only test actually testing this method is ProgrammaticApiTest.. Not sure if this is enough, but as I was missing a test case for the exception thrown in the value loader, I added that..
Also tried to extend the docs..
I am available for any suggestion and proposal for improvement..
Thanks for your pull request!
The title of your pull request does not follow our editorial rules. Could you have a look?
- title should preferably start with an uppercase character (if it makes sense!)
- title should not contain an issue number (use
Fix #1234in the description instead)
This message is automatically generated by a bot.
@gwenneg CI workflows were not executed, can you approve their run?
Updated the PR as requested, but please look into https://github.com/quarkusio/quarkus/pull/26863#discussion_r933279372
I'll review this shortly (hopefully today).
Rebased on the latest main..
Do I need to rebase on the latest master?
Do I need to rebase on the latest master?
Only in case of conflicts. It's not needed right now.
OK all tasks done, I guess this can be merged.
:waning_crescent_moon: This workflow status is outdated as a new workflow run has been triggered.
Failing Jobs - Building cad9bfadad2e93326462988628af65ebbe9463eb
| Status | Name | Step | Failures | Logs | Raw logs |
|---|---|---|---|---|---|
| :heavy_check_mark: | JVM Tests - JDK 11 | ||||
| ✖ | JVM Tests - JDK 11 Windows | Build |
Failures | Logs | Raw logs |
| :heavy_check_mark: | JVM Tests - JDK 17 | ||||
| :heavy_check_mark: | JVM Tests - JDK 18 |
Full information is available in the Build summary check run.
Failures
:gear: JVM Tests - JDK 11 Windows #
- Failing: extensions/cache/deployment
! Skipped: extensions/spring-cache/deployment integration-tests/cache integration-tests/devmode and 1 more
:package: extensions/cache/deployment
✖ io.quarkus.cache.test.runtime.ConcurrencyTest.testConcurrentCacheAccessWithLockTimeout line 67 - More details - Source on GitHub
org.opentest4j.AssertionFailedError: expected: not equal but was: <pool-51-thread-1>
at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:152)
at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
One of the old tests failed but it's unrelated to this PR because it does not change the failing test or affect any of the existing caching APIs. I'll relaunch the tests to check if the failure happens consistently.
LGTM
Thank you again for your patience smile
No problem. Let me know if I can help with some other stuff in the future..