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