-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Demonstrate use of @DataJpaTest when multiple datasources are configured #332
Comments
I guess you need to bring this up with the Boot team. I am not sure |
Hi @bemace |
@bemace , @viniciusffj did you solve it? I have the same issue with @jdbcTest . |
Found a possible solution here. Basically you manually configure the H2 database appropriately instead of letting Spring do it automatically. Create an application.properties file in “src/test/resources” with the following content
|
I'm having the same problem when multiple datasources are configured (and only using I could also solve it by overriding the application.properties database config with H2 settings manually (and then not using the |
As I run into that issue again today, sadly there has not been any action on this issue. Could you maybe have a look at it again, and evaluate if it could be fixed or suggested workarounds could be added? |
This the issue tracker for the examples, not one for the individual projects. As indicated before, this seems to be related to the way |
I've successfully configured two datasources per your example, but it appears additional configuration is needed to make @DataJpaTest's magic work. Currently my attempts fail with below stack trace, and it's not at all clear to a beginner what needs to change to make this work.
The text was updated successfully, but these errors were encountered: