-
Notifications
You must be signed in to change notification settings - Fork 695
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
chore: Reuse Containers in tests; Add Test parameters #1853
Conversation
4935aab
to
0b12665
Compare
Failed after rebase, will take a look |
0b12665
to
dc8009a
Compare
Fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the comments about MariaDB and SQL Server:
- Can confirm that
startCompose
andstopCompose
work as expected on my end. - Gradle task
test
behaves a little different now in that it runs all tests in all files in all databases.- Would it be possible to have a task to run a single test (or a single test file) using all databases at once? Or maybe I missed a way?
- Having the database and dialect as part of the test name in the Test runner tab is going to be so helpful! 😄
Very excited for this PR! ❤️
exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/Database.kt
Outdated
Show resolved
Hide resolved
exposed-java-time/src/test/kotlin/org/jetbrains/exposed/DefaultsTest.kt
Outdated
Show resolved
Hide resolved
exposed-tests/src/test/kotlin/org/jetbrains/exposed/sql/tests/shared/ddl/CreateDatabaseTest.kt
Outdated
Show resolved
Hide resolved
...-tests/src/test/kotlin/org/jetbrains/exposed/sql/tests/shared/functions/MathFunctionTests.kt
Outdated
Show resolved
Hide resolved
@bog-walk, yep. I've noticed it's starting to be slightly different with |
8d6d01e
to
66e4af7
Compare
buildSrc/src/main/kotlin/org/jetbrains/exposed/gradle/Versions.kt
Outdated
Show resolved
Hide resolved
This is what I get when running
For example,
|
66e4af7
to
6792bd3
Compare
6792bd3
to
1e27dab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All gradle tasks work well on my end. Looks great!
@e5l This test is failing for me |
@joc-a, thanks! fixed |
* Make all build scripts indexed, cleanup unused plugin * Update dependencies * Add explicit SERVICE_HOST to avoid network issues with Docker 20.* on linux * Do not log ignored tests * Prevent db containers to restart in tests * Cleanup docker plugin usages * Fix db credentials * Add test name to parameters * Reduce columns iteration time * Reduce date time test time * Migrate to faster oracle container * Force drop table before test
This PR adds parameters to the test tasks:
container
,database
, anddialect
. It also makes all modules and tests using the same database containers, avoiding starting a new one.Two gradle tasks were introduced:
startCompose
,stopCompose
. With this 2 tasks you can warmup containers before testing, so no containers will be restarted.