50onRed / mock-jedis

Mock Jedis is a library for mocking out Jedis clients
MIT License
82 stars 47 forks source link

MockJedisPool not working for scala #35

Open hanrw opened 9 years ago

hanrw commented 9 years ago

Exception:
redis.clients.jedis.exceptions.JedisException: Could not return the resource to the pool [info] at redis.clients.util.Pool.returnResourceObject(Pool.java:65) [info] at org.sedis.Pool.withJedisClient(sedis.scala:105) [info] at com.remarkmedia.dragon.service.infrastructure.oauth2.OauthClient$.validate(OauthClient.scala:39) [info] at com.remarkmedia.dragon.service.infrastructure.oauth2.OauthClientSpec$$anonfun$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(OauthClientSpec.scala:23) [info] at com.remarkmedia.dragon.service.infrastructure.oauth2.OauthClientSpec$$anonfun$1$$anonfun$apply$mcV$sp$1.apply(OauthClientSpec.scala:23) [info] at com.remarkmedia.dragon.service.infrastructure.oauth2.OauthClientSpec$$anonfun$1$$anonfun$apply$mcV$sp$1.apply(OauthClientSpec.scala:23)

Code: val jedisPool = new MockJedisPool(new JedisPoolConfig(), "localhost") implicit val sedisPool = new Pool(jedisPool)