docker-it-scala
docker-it-scala copied to clipboard
Execution Context Issues
When I mix in a DockerKit in with AsyncFlatSpec from Scalatest3, I'm getting a "ambiguous implicit values" error because both are creating an execution context. I think the right behavior is for DockerKit to either depend on an externally-provided ExecutionContext, or not allow it's executionContext to be exposed to the outside world.
Maybe we should change it so that all internal blocking calls are executed on special ExecutionContext (which will be possible to override), and transformations map
, flatMap
, etc. are performed on Implicit global
A related problem is that this has caused interesting behaviour in our tests where we're relying on creating new threads within the test (e.g. creating futures which are then Await
ed on) - the workaround has been to override the dockerExecutionContext
implicit in our test suite.
Sorry, I know this ExecutionContext stuff is a big mess at the moment. it is hard to track to what's going on. I'm working on addressing this issue in new version (0.10). Will keep it open
I had the same issue. Btw, why not just make execution context for docker as private
? It helped to me, but I had to copy-paste DockerKit
and DockerTestKit
to make that change.