-
Notifications
You must be signed in to change notification settings - Fork 37
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
Improve JDBC integration tests #1747
Conversation
This reverts commit cf63315.
to make things robust
@@ -56,6 +56,7 @@ sourceSets { | |||
compileClasspath += main.output + test.output | |||
runtimeClasspath += main.output + test.output | |||
srcDir file('src/integration-test/java') | |||
include '**/com/scalar/db/storage/jdbc/*.java' |
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.
integrationTestMultiStorage
needs to be able to access com.scalar.db.storage.jdbc.JdbcTestUtils
// - Create a new method to retry only for the method | ||
Uninterruptibles.sleepUninterruptibly(10000, TimeUnit.MILLISECONDS); | ||
if (JdbcTestUtils.isYugabyte(rdbEngine)) { | ||
Uninterruptibles.sleepUninterruptibly(1000, TimeUnit.MILLISECONDS); |
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.
With the retry, such a long wait is no longer needed.
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.
LGTM! Thank you!
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.
LGTM, thank you!
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.
LGTM! Thank you!
Description
In the current JDBC integration tests, there is room to improve a few points.
RdbEngineStrategy.toString()
or equivalent to know the actual class (RdbEngineXxxxxx
) that implementsRdbEngineStrategy
interface sinceRdbEngineXxxxxx
s are package-private. These string comparisons can be replaced with class type comparison.SchemaLoaderIntegrationTestBase#createTablesThenDeleteTables_ShouldExecuteProperly()
with YugabyteDB sometimes failed even with 10 seconds wait (e.g., https://github.com/scalar-labs/scalardb/actions/runs/9123522841/job/25086080469). We need to manually retry failed job in this case. We've already found retrying for the test case works well.Related issues and/or PRs
https://github.com/scalar-labs/scalardb/pull/1744/files#r1603305279
Changes made
JdbcTestUtils.ixXxxxxx(RdbEngineStrategy)
SchemaLoaderIntegrationTestBase#createTablesThenDeleteTables_ShouldExecuteProperly()
to retry in the case of YugabyteDB. Also, the 10 second wait can be reduced to 1 second.Checklist
Additional notes (optional)
None
Release notes
N/A