I was refactoring tests in Play Framework on my workstation(Mint 17.3). The goal was for them to be environment agnostic, so I could run them anywhere, therefore I used EmbedMongo and Embedded Redis.
"com.github.simplyscala" %% "scalatest-embedmongo" % "0.2.3-SNAPSHOT"
"com.github.kstyrc" % "embedded-redis" % "0.6"
When I thought I was done and everything was green, I decided to run it TravisCI. Unfortunately it looks like Embedded Redis does not want to start there:
application - Redis Plugin enabled. Connecting to Redis on 127.0.0.1:6379 to 0 with timeout 2000.
application - Redis Plugin pool configuration: redis.clients.jedis.JedisPoolConfig@d213e2f[maxTotal=8,maxIdle=8,minIdle=0,lifo=true,maxWaitMillis=-1,minEvictableIdleTimeMillis=60000,softMinEvictableIdleTimeMillis=1800000,numTestsPerEvictionRun=-1,evictionPolicyClassName=org.apache.commons.pool2.impl.DefaultEvictionPolicy,testOnBorrow=false,testOnReturn=false,testWhileIdle=true,timeBetweenEvictionRunsMillis=30000,blockWhenExhausted=true,jmxEnabled=true,jmxNamePrefix=pool]
WhateverSpec
Whatever should
! add avatar urls and result summaries to table json with opponent
redis.clients.jedis.exceptions.JedisConnectionException: Fatal execution error, caused by Could not get a resource from the pool (Pool.java:42)
redis.clients.util.Pool.getResource(Pool.java:42)
org.sedis.Pool.withJedisClient(sedis.scala:101)
controllers.WhateverSpec.after(WhateverSpec.scala:73)
controllers.WhateverSpec.after(WhateverSpec.scala:29)
redis.clients.jedis.Connection.connect(Connection.java:142)
redis.clients.jedis.BinaryClient.connect(BinaryClient.java:75)
redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1724)
redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:65)
org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:819)
org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:429)
org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:360)
redis.clients.util.Pool.getResource(Pool.java:40)
org.sedis.Pool.withJedisClient(sedis.scala:101)
controllers.WhateverSpec.after(WhateverSpec.scala:73)
controllers.WhateverSpec.after(WhateverSpec.scala:29)
redis.clients.jedis.Connection.connect(Connection.java:137)
redis.clients.jedis.BinaryClient.connect(BinaryClient.java:75)
redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1724)
redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:65)
org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:819)
org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:429)
org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:360)
redis.clients.util.Pool.getResource(Pool.java:40)
org.sedis.Pool.withJedisClient(sedis.scala:101)
controllers.WhateverSpec.after(WhateverSpec.scala:73)
controllers.WhateverSpec.after(WhateverSpec.scala:29)
CAUSED BY
redis.clients.jedis.exceptions.JedisConnectionException: java.net.ConnectException: Connection refused (Connection.java:142)
redis.clients.jedis.Connection.connect(Connection.java:142)
redis.clients.jedis.BinaryClient.connect(BinaryClient.java:75)
redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1724)
redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:65)
org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:819)
org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:429)
org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:360)
redis.clients.util.Pool.getResource(Pool.java:40)
org.sedis.Pool.withJedisClient(sedis.scala:101)
controllers.WhateverSpec.after(WhateverSpec.scala:73)
controllers.WhateverSpec.after(WhateverSpec.scala:29)
redis.clients.jedis.Connection.connect(Connection.java:137)
redis.clients.jedis.BinaryClient.connect(BinaryClient.java:75)
redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1724)
redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:65)
org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:819)
org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:429)
org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:360)
redis.clients.util.Pool.getResource(Pool.java:40)
org.sedis.Pool.withJedisClient(sedis.scala:101)
controllers.WhateverSpec.after(WhateverSpec.scala:73)
controllers.WhateverSpec.after(WhateverSpec.scala:29)
CAUSED BY
java.net.ConnectException: Connection refused (Connection.java:137)
redis.clients.jedis.Connection.connect(Connection.java:137)
redis.clients.jedis.BinaryClient.connect(BinaryClient.java:75)
redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1724)
redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:65)
org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:819)
org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:429)
org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:360)
redis.clients.util.Pool.getResource(Pool.java:40)
org.sedis.Pool.withJedisClient(sedis.scala:101)
controllers.WhateverSpec.after(WhateverSpec.scala:73)
controllers.WhateverSpec.after(WhateverSpec.scala:29)
Then I thought maybe it's a problem with travis. So I've tried different containers, jdks and os versions (even osx), but still couldn't fix it.
So I've decided to install on virtualbox clean Ubuntu 14.04 - it has the same issues as travis CI. I've checked sbt params and they are the same.
Has anyone have any idea what may be wrong or what else should I check?
Aucun commentaire:
Enregistrer un commentaire