-
Notifications
You must be signed in to change notification settings - Fork 3
Add integration tests for table store #239
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
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.
Summary of Changes
Hello @jnmt, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request introduces a comprehensive suite of integration tests for the table store functionality. It establishes a new common-test
module to centralize shared test utilities and configurations, and then leverages this setup to validate various SQL-like operations (SELECT, INSERT, UPDATE, metadata queries, history queries) against the table store. Additionally, it includes minor refinements to the Scan
contract to improve handling of primary and index key conditions.
Highlights
- New
common-test
Module: A dedicated Gradle module (common-test
) has been introduced to centralize shared test utilities and configurations, promoting reusability across different components. - Extensive Table Store Integration Tests: A new
TableStoreEndToEndTest
class has been added, providing thorough integration tests for the table store's SQL-like capabilities, covering data manipulation (INSERT, UPDATE, SELECT), metadata queries, and historical data retrieval. - Refined
Scan
Contract Logic: TheScan
contract ingeneric-contracts
has been updated to improve the validation logic for primary and index key conditions, specifically handlingIS NULL
andIS NOT NULL
operators more robustly. - Gradle Build Configuration Updates: The build configurations for
client
,table-store
, andsettings.gradle
have been updated to incorporate the newcommon-test
module and to define a dedicatedintegrationTest
source set and task for the table store.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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.
Code Review
This pull request introduces a comprehensive suite of integration tests for the table store, which is a valuable addition for ensuring its stability and correctness. The refactoring to create a common-test
module for shared test utilities is also a good move towards better code organization. While the overall changes are positive, I've identified a few areas for improvement. Specifically, I've commented on a fragile path construction in the test base class, a brittle method for generating PartiQL query strings that should be refactored for robustness, and some misleading test method names that could cause confusion. Addressing these points will enhance the quality and maintainability of the new test suite.
table-store/src/integration-test/java/com/scalar/dl/tablestore/TableStoreEndToEndTest.java
Show resolved
Hide resolved
common-test/src/main/java/com/scalar/dl/ledger/LedgerEndToEndTestBase.java
Show resolved
Hide resolved
table-store/src/integration-test/java/com/scalar/dl/tablestore/TableStoreEndToEndTest.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.
Pull Request Overview
This PR adds comprehensive integration tests for the table store module, providing end-to-end testing capabilities for SQL statement execution and validation operations.
- Adds a new
TableStoreEndToEndTest
class with extensive test coverage for SELECT, INSERT, UPDATE, and metadata operations - Configures integration test infrastructure including Gradle build configuration and CI/CD pipeline setup
- Creates a base test class
LedgerEndToEndTestBase
for common ledger testing functionality
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
table-store/src/integration-test/java/com/scalar/dl/tablestore/TableStoreEndToEndTest.java | Comprehensive integration test suite covering SQL operations, joins, history queries, and validation |
table-store/build.gradle | Gradle configuration for integration test source set and task definition |
common-test/src/main/java/com/scalar/dl/ledger/LedgerEndToEndTestBase.java | Base class providing common ledger test infrastructure and server setup |
common-test/scripts/ledger-schema.json | Symlink to ledger schema for test configuration |
common-test/build.gradle | Additional dependencies for ledger testing support |
.github/workflows/scalar.yml | CI workflow configuration for running table store integration tests |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
table-store/src/integration-test/java/com/scalar/dl/tablestore/TableStoreEndToEndTest.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.
Overall, looking good! Thank you!
Left one question. PTAL!
table-store/src/integration-test/java/com/scalar/dl/tablestore/TableStoreEndToEndTest.java
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.
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!
Description
This PR adds integration tests for the table store.
Related issues and/or PRs
Depends on:
Changes made
Checklist
Additional notes (optional)
N/A
Release notes
Added integration tests for the table store.