For example, we observed the following test failures when running io.jboot.test.cache.j2cache.J2CacheTester#testGet and io.jboot.test.cache.caffeine.CaffeineTester#testDue in sequence.
[ERROR] CaffeineTester.testDue:45 » JedisConnection Could not get a resource from the pool
[ERROR] J2CacheTester.testGet:21 » JedisConnection Could not get a resource from the pool
Root cause and fix
The config set up of j2cache in io.jboot.test.cache.j2cache.J2CacheTester will lead to errors of JedisConnection Could not get a resource from the pool. The fix is to use ehcache instead, which will make all tests pass.
This PR is to fix several flaky tests.
Problem
For tests in
io.jboot.test.cache.j2cache.J2CacheTester
, if they are run before any of the following tests, the following test will failFor example, we observed the following test failures when running
io.jboot.test.cache.j2cache.J2CacheTester#testGet
andio.jboot.test.cache.caffeine.CaffeineTester#testDue
in sequence.Root cause and fix
The config set up of
j2cache
inio.jboot.test.cache.j2cache.J2CacheTester
will lead to errors ofJedisConnection Could not get a resource from the pool
. The fix is to useehcache
instead, which will make all tests pass.