Closed evbo closed 5 years ago
I was running into the same issue, but it was fixed by upgrading to 0.9.8
libraryDependencies ++= Seq(
"com.whisk" %% "docker-testkit-scalatest" % "0.9.8" % "test",
"com.whisk" %% "docker-testkit-impl-spotify" % "0.9.8" % "test")
I notice that the README still says 0.9.5
. I will PR a README change to help others avoid this.
@evbo Can you confirm this fixes the issue for you as well?
It appears that docker-it-scala in some cases fails to connect using postgres driver libraries 42.2.2 in my case. Here are my steps:
The failure is documented precisely here: https://github.com/whisklabs/docker-it-scala/issues/101
First, to verify something isn't wrong with my docker setup, I place a break point so that docker-it-scala starts the docker container but doesn't yet connect. This allows me to verify I can connect outside of the scala code.
Here's my breakpoint: https://github.com/whisklabs/docker-it-scala/blob/master/samples/src/main/scala/com/whisk/docker/DockerPostgresService.scala#L38
Then, I verify my container was created:
With that confirmed, I try to confirm that postgres is running correctly in the container:
Now that I've confirmed I can connect locally, I download a simple JDBC commandline tool and the latest postgresql driver (that I'm using) and connect successfully:
So this means that I can connect with a 42 postgres driver, but not so with docker-it-scala. Trying with docker-it-scala, I get the exceptions exactly as documented here: https://github.com/whisklabs/docker-it-scala/issues/101
I can fix this problem by downgrading my driver sbt dependency to: "org.postgresql" % "postgresql" % "9.4.1212", // "org.postgresql" % "postgresql" % "42.2.2",