quarkus icon indicating copy to clipboard operation
quarkus copied to clipboard

Exposing getIfPresent in the CaffeineCache

Open ivansenic opened this issue 3 years ago • 5 comments

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..

ivansenic avatar Jul 21 '22 14:07 ivansenic

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 #1234 in the description instead)

This message is automatically generated by a bot.

quarkus-bot[bot] avatar Jul 21 '22 14:07 quarkus-bot[bot]

@gwenneg CI workflows were not executed, can you approve their run?

rsvoboda avatar Jul 22 '22 07:07 rsvoboda

Updated the PR as requested, but please look into https://github.com/quarkusio/quarkus/pull/26863#discussion_r933279372

ivansenic avatar Jul 29 '22 13:07 ivansenic

I'll review this shortly (hopefully today).

gwenneg avatar Aug 01 '22 14:08 gwenneg

Rebased on the latest main..

ivansenic avatar Aug 02 '22 12:08 ivansenic

Do I need to rebase on the latest master?

ivansenic avatar Aug 11 '22 14:08 ivansenic

Do I need to rebase on the latest master?

Only in case of conflicts. It's not needed right now.

gwenneg avatar Aug 12 '22 14:08 gwenneg

OK all tasks done, I guess this can be merged.

ivansenic avatar Aug 15 '22 07:08 ivansenic


: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)

quarkus-bot[bot] avatar Aug 16 '22 09:08 quarkus-bot[bot]

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.

gwenneg avatar Aug 16 '22 09:08 gwenneg

LGTM

Thank you again for your patience smile

No problem. Let me know if I can help with some other stuff in the future..

ivansenic avatar Aug 18 '22 09:08 ivansenic