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

Class org.junit.rules.ExternalResource not found - continuing with a stub. #38

Closed
tymm opened this issue Jul 11, 2020 · 2 comments
Closed

Comments

@tymm
Copy link

tymm commented Jul 11, 2020

When trying to use Flyway migration with embedded-postgres, I get the following error:

Class org.junit.rules.ExternalResource not found - continuing with a stub.
[error]           EmbeddedPostgresRules.preparedDatabase(
[error]           ^

What am I doing wrong?

@tomix26
Copy link
Collaborator

tomix26 commented Jul 17, 2020

Are you using junit4? EmbeddedPostgresRules is intended for use in junit4 tests. If you are using junit5, you need to use EmbeddedPostgresExtension instead. Other testing frameworks are not supported at this moment. Check the following issue for more information about junit5 support: #34

@tymm
Copy link
Author

tymm commented Jul 24, 2020

Thanks. No, I'm not using junit at all.
But turns out that I can just use getPostgresDatabase to get the DataSource and with that use Flyway as normal for migration.

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

No branches or pull requests

2 participants