-
Notifications
You must be signed in to change notification settings - Fork 104
feat: Add A2AClient test variants for server-side testing #180
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
feat: Add A2AClient test variants for server-side testing #180
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 @misselvexu, 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 new set of server-side integration tests for the A2AClient, designed to validate its interactions with different server implementations. It establishes a common abstract test framework and provides concrete implementations for Jakarta and Quarkus environments.
Highlights
- New Abstract Test Class: A new abstract class,
AbstractA2AServerClientTest, has been added to provide a common foundation for server-side A2A client tests, encapsulating shared test logic and client creation. - Jakarta Test Variant: A new test class,
JakartaA2AServerClientTest, has been introduced to specifically test the A2AClient's interaction with a Jakarta-based server using Arquillian for deployment. - Quarkus Test Variant: A new test class,
QuarkusA2AServerClientTest, has been added to test the A2AClient's interaction with a Quarkus-based server using@QuarkusTest. - Core Client Functionality Testing: The new tests cover essential A2AClient functionalities, including retrieving tasks (
getTask), sending messages (sendMessage), and fetching agent card information (getAgentCard).
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 is currently in preview and 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 to provide feedback.
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 new testing framework for server-side implementations using the A2AClient. It adds an abstract base test class with common logic and provides concrete implementations for Jakarta and Quarkus environments. The tests in the abstract base class currently swallow exceptions, which could cause them to pass silently even if the underlying code fails. This is a critical issue that needs to be addressed to ensure the reliability of the tests. Also, the test setup for the Jakarta implementation includes a redundant configuration that should be cleaned up for better maintainability.
tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerClientTest.java
Outdated
Show resolved
Hide resolved
tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerClientTest.java
Outdated
Show resolved
Hide resolved
tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerClientTest.java
Outdated
Show resolved
Hide resolved
sdk-jakarta/src/test/java/io/a2a/server/apps/jakarta/JakartaA2AServerClientTest.java
Outdated
Show resolved
Hide resolved
…stractA2AServerClientTest.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…stractA2AServerClientTest.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…stractA2AServerClientTest.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…AServerClientTest.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…kus reference implementation (a2aproject#178) # Description Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md). - [x] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [x] Ensure the tests pass - [x] Appropriate READMEs were updated (if necessary) Fixes a2aproject#176 🦕
|
Hi @misselvexu thank you! We will look at this shortly. Please note that the Jakarta SDK integration has now been moved to https://github.com/wildfly-extras/a2a-java-sdk-server-jakarta so the pull request will need splitting. But you can wait with that until we've had a chance to review this pull request. |
Okay, move forward with your plans and pacing, and AT me for any adjustments that need to be made, in this PR. |
|
@misselvexu Thanks very much for working on this! I've taken a look and see that Would you able to adjust things so that |
# Description This PR incorporates the latest feedback from a2aproject#138. - [x] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md). - [x] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [x] Ensure the tests pass - [x] Appropriate READMEs were updated (if necessary)
I reorganized the code to see if it meets the requirements and directly replaced the Http call in AbstractA2AServerTest with an A2AClient call, while removing some unnecessary methods. |
fix client send stream message without set text/event-stream. # Description Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md). - [ ] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [ ] Ensure the tests pass - [ ] Appropriate READMEs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕 --------- Co-authored-by: chenkangqiang <[email protected]>
fjuma
left a comment
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.
@misselvexu Thanks for the updates! I've added some feedback, feel free to let us know if you have any questions.
tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java
Show resolved
Hide resolved
tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java
Outdated
Show resolved
Hide resolved
tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java
Outdated
Show resolved
Hide resolved
tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java
Show resolved
Hide resolved
tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java
Outdated
Show resolved
Hide resolved
tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java
Show resolved
Hide resolved
tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java
Show resolved
Hide resolved
tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java
Show resolved
Hide resolved
| } | ||
|
|
||
| @Test | ||
| public void testResubscribeNoExistingTaskError() throws Exception { |
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.
We shouldn't delete any test cases. It should be possible to use client.resubscribeToTask here. Let us know if you have questions about this.
| } | ||
|
|
||
| @Test | ||
| public void testResubscribeExistingTaskSuccess() throws Exception { |
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.
We shouldn't delete this. We should be able to tweak it to use an A2A client method. Let us know if you have questions about this.
…ject#185) # Description While running the tests in a container is possible in Quarkus, and in WildFly (with Arquillian), this might not be possible for all Java runtimes. Hence, this PR changes the tests so the interactions with the TaskStore, QueueManager, and being notified about the subscription to a streaming request happening. Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md). - [x] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [x] Ensure the tests pass - [x] Appropriate READMEs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕
# Description Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md). - [x] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [x] Ensure the tests pass - [x] Appropriate READMEs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕 --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
# Description This PR brings in the updates required to align with the A2A v0.2.4 and v0.2.5 spec versions. - [X] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md). - [X] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [X] Ensure the tests pass - [X] Appropriate READMEs were updated (if necessary) Fixes a2aproject#183 🦕
# Description - [X] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md). - [X] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [X] Ensure the tests pass - [X] Appropriate READMEs were updated (if necessary)
…a2aproject#194) # Description **NOTE:** This will fail the TCK tests until a2aproject/a2a-tck#34 is included in a tag Depends on a2aproject/a2a-tck#34 - [X] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md). - [X] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [X] Ensure the tests pass - [X] Appropriate READMEs were updated (if necessary)
# Description Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md). - [x] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [x] Ensure the tests pass - [x] Appropriate READMEs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕
…oject#197) # Description Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md). - [x] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [x] Ensure the tests pass - [x] Appropriate READMEs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕
# Description Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md). - [x] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [x] Ensure the tests pass - [x] Appropriate READMEs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕
Release-As: 0.2.5
Release-As: 0.2.5
# Description Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ x] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md). - [ x] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [ x] Ensure the tests pass - [ x] Appropriate READMEs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕
|
@misselvexu Feel free to let us know if you have any questions about the changes. Thanks! |
Thank you for bringing this to my attention. I will resolve this issue within the next two days. Thank you. 🫡 |
Port the ServerCallContext from Python
# Description I noticed while reviewing a2aproject#181 and looking at the Python implementation that we don't have logging in the TaskManager. We decided on the logging strategy after the initial code was written. This PR addresses this omission.
|
Hi @misselvexu I think you need to fetch the main branch, and rebase on the main branch, and then force push. This PR includes a lot of commits which are already merged. If you are not familiar with how to do this, let me know, and I can do it from my side. I have the rights to push to people's feature branches. I'll also let you know what I did for future reference. |
Do it for me directly. Thank you. |
|
@misselvexu I took your branch and pushed it as-is here: https://github.com/a2aproject/a2a-java/compare/main...kabir:a2a-java:feature/issue-155-add-a2aclient-test-variants?expand=1 and it looks fine. There are no extra commits from myself or Farah. Then I simply tried to force push the branch for this PR and it told me there was nothing to do and the extra commits are still there. I don't want to use https://github.com/a2aproject/a2a-java/compare/main...kabir:a2a-java:feature/issue-155-add-a2aclient-test-variants?expand=1 as the PR though, since the repository squashes all the commits into one and then I think it will look like the work was done by me. I think what you can try is to close this PR, and then: and then either reopen this PR if it lets you, or create a new PR if not? |
Description
Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
CONTRIBUTINGGuide.fix:which represents bug fixes, and correlates to a SemVer patch.feat:represents a new feature, and correlates to a SemVer minor.feat!:, orfix!:,refactor!:, etc., which represent a breaking change (indicated by the!) and will result in a SemVer major.Fixes #155 🦕