docker-it-scala icon indicating copy to clipboard operation
docker-it-scala copied to clipboard

Execution Context Issues

Open joearasin opened this issue 8 years ago • 4 comments

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.

joearasin avatar Sep 28 '16 17:09 joearasin

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

viktortnk avatar Oct 01 '16 08:10 viktortnk

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 Awaited on) - the workaround has been to override the dockerExecutionContext implicit in our test suite.

kelveden avatar Jan 20 '17 15:01 kelveden

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

viktortnk avatar Sep 15 '17 23:09 viktortnk

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.

Jokser avatar Oct 20 '17 12:10 Jokser