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

Avoiding Embedded DataSource vs. Hikari DataSource Conflicts #8

Open
cer opened this issue Jun 22, 2020 · 2 comments
Open

Avoiding Embedded DataSource vs. Hikari DataSource Conflicts #8

cer opened this issue Jun 22, 2020 · 2 comments

Comments

@cer
Copy link
Collaborator

cer commented Jun 22, 2020

testRuntime.exclude group: "io.micronaut.configuration", module: "micronaut-jdbc-hikari"

src/main uses Hikari DataSource but some tests want to use Embedded DataSource.

Two questions:

  • Who defines the Hikari DataSource?
  • Why doesn't the Embedded DataSource override it?
  • What other options exist in Micronaut (e.g.profiles??) for handling this scenario?

@dartartem

@dartartem
Copy link
Contributor

1 - service, https://github.com/eventuate-examples/eventuate-micronaut-examples-customers-and-orders/blob/master/customers-service/build.gradle#L24

2 - because there were change in eventuate local https://github.com/eventuate-local/eventuate-local/pull/149/files , you said make it similar to spring. Please see thread: [updating-libraries] report 06/17/2020

3 - there is Requires annotation: https://docs.micronaut.io/latest/api/io/micronaut/context/annotation/Requires.html

@cer
Copy link
Collaborator Author

cer commented Jun 22, 2020

What about annotating the test datasource with https://docs.micronaut.io/latest/api/io/micronaut/context/annotation/Replaces.html?

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

2 participants