Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DockerKit's implicit ExecutionContext conflicts with Scalatest's AsyncTestSuite #89

Closed
prascuna opened this issue Aug 14, 2017 · 3 comments

Comments

@prascuna
Copy link

Hi there,
when using DockerKit along with ScalaTest's async test suites there's a conflict between the implicit ExecutionContext defined both in AsyncTestSuite and DockerKit traits:

Error:(27, 55) ambiguous implicit values:
 both method executionContext in trait AsyncTestSuite of type => scala.concurrent.ExecutionContext
 and lazy value dockerExecutionContext in trait DockerKit of type => scala.concurrent.ExecutionContext
 match expected type scala.concurrent.ExecutionContext
...

I was wondering if DockerKit could avoid declaring that dockerExecutionContext: ExecutionContext as implicit in order to avoid such conflict.

Thanks
PS: I'm happy to submit a PR if you reckon that might be useful as I do

@prascuna
Copy link
Author

Here there is a way to reproduce it:

class TestSpec extends AsyncWordSpec with Matchers with DockerTestKit with DockerMySQLService {
  "A test" should {
    "succeed" in {
      Future.successful(true).map(res => res shouldBe true)
    }
  }
}

DockerMySQLService is a trait that extends DockerKit with DockerKitDockerJava

@juanjoDiaz
Copy link

This duplicates #56 which also proposes a workaround and a possible solution

@viktortnk
Copy link
Contributor

Closing it as duplicate of #56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants