-
Notifications
You must be signed in to change notification settings - Fork 139
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
Add integration JDBC tests for cursor/fetch_size feature #1315
Add integration JDBC tests for cursor/fetch_size feature #1315
Conversation
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.
Being able to set JDBC driver version is sufficient to run these tests against a development version of the driver.
I'd keep jdbc
integration test suite and remove jdbcDev
, cloneJdbcDriverRepo
, and integDevJdbcTest
.
integ-test/src/test/java/org/opensearch/sql/devJdbc/CursorIT.java
Outdated
Show resolved
Hide resolved
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.
Looks like the cloneJdbcDriverRepo task is breaking both SQL Java CI and CodeQL-Scan.
…(review) Signed-off-by: Yury-Fridlyand <[email protected]>
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #1315 +/- ##
=========================================
Coverage 98.38% 98.38%
Complexity 3698 3698
=========================================
Files 343 343
Lines 9121 9121
Branches 586 586
=========================================
Hits 8974 8974
Misses 142 142
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
80af7ac
* Add integration JDBC tests for cursor/fetch_size feature. Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
…(review) Signed-off-by: Yury-Fridlyand <[email protected]>
This reverts commit dbc5b32. Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
80af7ac
to
0e1eb22
Compare
Rebased + added a fix for ITs. Shouldn't affect BWC. |
…-jdbc Signed-off-by: Yury-Fridlyand <[email protected]>
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.
Thanks for adding this test!
* Add integration JDBC tests for cursor/fetch_size feature. --------- Signed-off-by: Yury-Fridlyand <[email protected]> (cherry picked from commit 57ccb6c)
…project#1315) * Add integration JDBC tests for cursor/fetch_size feature. --------- Signed-off-by: Yury-Fridlyand <[email protected]>
* Add integration JDBC tests for cursor/fetch_size feature. --------- Signed-off-by: Yury-Fridlyand <[email protected]> (cherry picked from commit 57ccb6c) Co-authored-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand [email protected]
See team review and discussion on Bit-Quill#208
Description
Add new IT suite which uses JDBC to issue queries with and without
fetch_size
set.fetch_size
parameter invokes pagination feature (cursor
) which is currently supported by legacy engine only.New
:integ-test
tasks:integJdbcTest
Run ITs from
**/jdbc/*.java
. Existing tests inCursorIT
create and use DB connection using JDBC driver from maven artifact.Optional parameters:
-Dtest.debug
Enabled test debug.
--tests '<test_filter>
Filter test using wildcard, could be specified multiple times.
-DjdbcDriverVersion=<version>
Maven artifact version for JDBC driver to use; optional, defaulted to
1.2.0.0
.-DjdbcFile=<file>
Relative or absolute path to JDBC driver compiled binary (*.jar); if given, test platform uses it.
-DjdbcRepo=<repo_path>
Relative or absolute path to JDBC driver Maven repo to get the driver from. Note: it is highly recommended to have non-default version of the driver in this repo to avoid conflicts.
Test cluster log located in
integ-test/build/testclusters/integJdbcTest-0/logs/integJdbcTest.log
Test report saved in
integ-test/build/reports/tests/integJdbcTest
Examples:
# run tests with non-default (e.g. non-latest) released JDBC version ./gradlew :integ-test:integJdbcTest -DjdbcDriverVersion=1.0.0.0
Output sample:
Notes
Test filter in gradle
https://github.com/Bit-Quill/opensearch-project-sql/blob/24de6ff9eae35a824a664a865ad349788b744288/integ-test/build.gradle#L204-L206
requires
https://github.com/Bit-Quill/opensearch-project-sql/blob/24de6ff9eae35a824a664a865ad349788b744288/integ-test/build.gradle#L177
and doesn't work with JUnit 4. All IT framework uses Junit 4.
So,
init()
method of test classed isn't being called from superclasses automatically.@BeforeAll
/@BeforeClass
require a static method, so I can't callinitClient()
there. I have to moveinitClient()
to@BeforeEach
withinitialized
flag.New gradle tasks are not included into CI workflow.
Issues Resolved
N/A
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.