Replies: 3 comments
-
add debug=true to your configuration. Then take a look at the auto configuration classes in the system output. Is the Bucket4jAopConfig correctly configured? Is JCache correctly configured from the Spring Boot Starter? Is JCacheBucket4jConfiguration missing the CacheManager bean? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the hints, I'll have a look into this. As soon I have a solution I'll add it to the caffeine example project. |
Beta Was this translation helpful? Give feedback.
-
I created a pull request regarding testing |
Beta Was this translation helpful? Give feedback.
-
Hi everybody,
currently I'm having a very tough time trying to write unit tests if I used @ratelimiting annotation correctly, the fallback method and the skipCondition expressions are working correctly.
What I can't do is using @SpringBootTest in my unit test (too much stuff is started).
My general idea is to use JCache, i.e. by using Caffeine in the unit test.
Testclass looks like
Configuration class looks like
and application-ratelimit.properties look like
But always something is missing: SyncCacheResolver, RateLimitAspect or something else.
What would be the most elegant way to get the Unit-Test up and running?
Beta Was this translation helpful? Give feedback.
All reactions