sedis icon indicating copy to clipboard operation
sedis copied to clipboard

Redis connection closes when multiple tests are running in the same time

Open angeloh opened this issue 11 years ago • 1 comments

I have few test cases in one class and only one will succeed but all others are failed with redis pool exception. How can I make sure other tests can also get the connection from pool?

[error]    JedisConnectionException: : Could not get a resource from the pool  (Pool.java:22)
[error] redis.clients.util.Pool.getResource(Pool.java:22)
[error] org.sedis.Pool.withJedisClient(sedis.scala:79)
[error] com.typesafe.plugin.RedisPlugin$$anon$1.set_(RedisPlugin.scala:147)
[error] com.typesafe.plugin.RedisPlugin$$anon$1.set(RedisPlugin.scala:106)
[error] play.api.cache.Cache$.set(Cache.scala:58)
[error] controllers.Security$ResultWithToken.withTokenShort(Security.scala:51)
[error] controllers.Security$ResultWithToken.withTempToken(Security.scala:62)
[error] controllers.Security$$anonfun$HasToken$1$$anonfun$apply$3.apply(Security.scala:83)
[error] controllers.Security$$anonfun$HasToken$1$$anonfun$apply$3.apply(Security.scala:83)
[error] controllers.Security$$anonfun$HasToken$1.apply(Security.scala:82)
[error] controllers.Security$$anonfun$HasToken$1.apply(Security.scala:76)
[error] play.api.mvc.ActionBuilder$$anonfun$apply$10.apply(Action.scala:221)
[error] play.api.mvc.ActionBuilder$$anonfun$apply$10.apply(Action.scala:220)
Caused by: java.lang.IllegalStateException: Pool not open
    at org.apache.commons.pool.BaseObjectPool.assertOpen(BaseObjectPool.java:137)
    at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1065)
    at redis.clients.util.Pool.getResource(Pool.java:20)

angeloh avatar Jun 27 '14 17:06 angeloh

I post on SO too.

http://stackoverflow.com/questions/24421063/redis-connection-closes-when-multiple-tests-are-running-in-the-same-time

angeloh avatar Aug 14 '14 15:08 angeloh