Skip to content

feat(tests): enhance load tests to support gRPC protocol #2501

Merged
robfrank merged 3 commits intomainfrom
feat/2498-grpc-protocol-more-tests
Sep 12, 2025
Merged

feat(tests): enhance load tests to support gRPC protocol #2501
robfrank merged 3 commits intomainfrom
feat/2498-grpc-protocol-more-tests

Conversation

@robfrank
Copy link
Collaborator

This pull request introduces support for GRPC protocol in the end-to-end performance tests, enabling tests to run against both HTTP and GRPC interfaces. The changes include refactoring test setup to use a new ServerWrapper abstraction, updating the test containers to expose the GRPC port and enable the GRPC plugin, and enhancing the DatabaseWrapper to select protocol dynamically. Additionally, a new batch-aware streaming result set is added to the GRPC client.

Test infrastructure and protocol support:

  • Refactored test setup in SingleServerLoadTestIT.java, SingleServerSimpleLoadTestIT.java, and SingleLocalhostServerSimpleLoadTestIT.java to use ServerWrapper instead of raw host/port, and to allow parameterized testing with both HTTP and GRPC protocols. ([[1]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-eba3c81d56ffb7789ec81f4aa902f479c51aa5b0f90cf5e51a65d23728e0dea4L20-R28), [[2]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-eba3c81d56ffb7789ec81f4aa902f479c51aa5b0f90cf5e51a65d23728e0dea4L53-R53), [[3]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-eba3c81d56ffb7789ec81f4aa902f479c51aa5b0f90cf5e51a65d23728e0dea4L62-R62), [[4]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-eba3c81d56ffb7789ec81f4aa902f479c51aa5b0f90cf5e51a65d23728e0dea4L71-R71), [[5]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-c7a022fc8884a652447afe83ff2c66b65af1e42b80bcf9e1b0ddbad04511ea47R5-R29), [[6]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-c7a022fc8884a652447afe83ff2c66b65af1e42b80bcf9e1b0ddbad04511ea47L41-R45), [[7]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-7029ee2fd3e6cbde4050166189f12b48763eb4bde8ea8f4e3fbbf59ebf51ad5aR4), [[8]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-7029ee2fd3e6cbde4050166189f12b48763eb4bde8ea8f4e3fbbf59ebf51ad5aL87-R89), [[9]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-7029ee2fd3e6cbde4050166189f12b48763eb4bde8ea8f4e3fbbf59ebf51ad5aL114-R114), [[10]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-7029ee2fd3e6cbde4050166189f12b48763eb4bde8ea8f4e3fbbf59ebf51ad5aL123-R123), [[11]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-7029ee2fd3e6cbde4050166189f12b48763eb4bde8ea8f4e3fbbf59ebf51ad5aL132-R132))
  • Updated DatabaseWrapper to support both HTTP and GRPC protocols, including protocol selection logic and GRPC connection handling. ([[1]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-d0a1e463fdc50ea6aebfc20e179ea0f3a2847c60802612539bf86a5300104138L23-R59), [[2]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-d0a1e463fdc50ea6aebfc20e179ea0f3a2847c60802612539bf86a5300104138R68-R92))
  • Added new ServerWrapper class to encapsulate host, HTTP port, and GRPC port, with convenient construction from a test container. ([e2e-perf/src/test/java/com/arcadedb/test/support/ServerWrapper.javaR1-R14](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-4927ce796a110fd6e02c5ec871c5534a25251696de48aec992d1a4131d0623adR1-R14))

Test container and dependency updates:

  • Modified ContainersTestTemplate to expose GRPC port (50051), enable the GRPC plugin in ArcadeDB, and return a list of ServerWrapper instances when starting containers. ([[1]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-6c291fb4d5b94afa7e48fa346dcbef370086a1e58a4e2e1d261092662432bcc9L130-R138), [[2]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-6c291fb4d5b94afa7e48fa346dcbef370086a1e58a4e2e1d261092662432bcc9L147-R152), [[3]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-6c291fb4d5b94afa7e48fa346dcbef370086a1e58a4e2e1d261092662432bcc9L177-R182), [[4]](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-6c291fb4d5b94afa7e48fa346dcbef370086a1e58a4e2e1d261092662432bcc9L187-R192))
  • Added dependencies for GRPC client and JUnit parameterized tests in pom.xml. ([e2e-perf/pom.xmlR69-R86](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-a62ae2b366288f8379a9ae389cc1460b63827cdb74a980861929aca52d5449e9R69-R86))

GRPC client enhancements:

  • Added new BatchedStreamingResultSet class to the GRPC client module, providing batch-aware streaming result set capabilities for advanced use cases. ([grpc-client/src/main/java/com/arcadedb/remote/grpc/BatchedStreamingResultSet.javaR1-R58](https://github.com/ArcadeData/arcadedb/pull/2501/files#diff-00aaccf18da4f692ae648124d2b3f92406b34cfa7041188ee2b19fe878e6a04bR1-R58))

@robfrank robfrank added this to the 25.9.1 milestone Sep 12, 2025
@robfrank robfrank self-assigned this Sep 12, 2025
@robfrank robfrank added the enhancement New feature or request label Sep 12, 2025
@robfrank robfrank linked an issue Sep 12, 2025 that may be closed by this pull request
8 tasks
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 @robfrank, 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 comprehensive support for the gRPC protocol within the end-to-end performance testing framework. The changes involve a substantial refactoring of the test infrastructure to allow seamless switching between HTTP and gRPC, alongside improvements to the gRPC client for more efficient data streaming and overall code modernization.

Highlights

  • gRPC Protocol Support in Load Tests: End-to-end performance tests now support the gRPC protocol, enabling comprehensive testing against both HTTP and gRPC interfaces for ArcadeDB.
  • Test Infrastructure Refactoring: The test setup was significantly refactored, introducing a new ServerWrapper abstraction for consistent server representation and updating test containers to expose the gRPC port and enable the gRPC plugin.
  • Dynamic Protocol Selection: The DatabaseWrapper has been enhanced to dynamically select between HTTP and gRPC protocols for database connections, improving test flexibility.
  • Batch-Aware Streaming Results: A new BatchedStreamingResultSet class was added to the gRPC client, providing advanced batch-aware streaming capabilities for more efficient result handling.
  • Code Modernization and Cleanup: Significant refactoring in RemoteGrpcDatabase includes extracting inner classes into separate files, simplifying error handling, and utilizing modern Java features like records and switch expressions for cleaner, more maintainable code.
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

  1. 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.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 is a great enhancement, adding gRPC protocol support to the end-to-end performance tests. The refactoring is well-executed, especially the introduction of the ServerWrapper abstraction and the parameterization of tests to run against both HTTP and gRPC. The code cleanup in the grpc-client module, such as converting classes to records, moving inner classes to their own files, and using modern Java features like switch expressions, significantly improves code quality and maintainability. I have one minor suggestion to remove some redundant code.

@codacy-production
Copy link

codacy-production bot commented Sep 12, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-1.23% 0.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (aae1b32) 72486 45794 63.18%
Head commit (347b701) 72455 (-31) 44884 (-910) 61.95% (-1.23%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#2501) 129 0 0.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@robfrank robfrank merged commit a546f89 into main Sep 12, 2025
8 of 10 checks passed
robfrank added a commit that referenced this pull request Nov 10, 2025
@robfrank robfrank deleted the feat/2498-grpc-protocol-more-tests branch January 14, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add grpc protocol wrapper

1 participant