Skip to content

chore: Rerun flaky tests on CI if they failed#905

Open
kabir wants to merge 4 commits into
a2aproject:mainfrom
kabir:rerun-flaky-tests
Open

chore: Rerun flaky tests on CI if they failed#905
kabir wants to merge 4 commits into
a2aproject:mainfrom
kabir:rerun-flaky-tests

Conversation

@kabir
Copy link
Copy Markdown
Collaborator

@kabir kabir commented Jun 1, 2026

Use the @tag("flaky") annotation to mark flaky tests

Copy link
Copy Markdown
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 introduces a flaky-test-retry Maven profile to automatically retry tests tagged with @Tag("flaky") up to three times, and applies this tag to several tests in AbstractA2AServerTest.java. However, the current implementation auto-activates this profile for any module containing src/test/java, which introduces significant build performance overhead due to redundant Surefire executions and causes dependency pollution by forcing modules without JUnit tests to include junit-jupiter-api. It is recommended to either define the profile locally within the specific modules that have flaky tests or disable the execution by default and enable it selectively.

Comment thread pom.xml
Comment thread examples/cloud-deployment/server/pom.xml Outdated
@kabir
Copy link
Copy Markdown
Collaborator Author

kabir commented Jun 1, 2026

/gemini review

Copy link
Copy Markdown
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 introduces a flaky test retry mechanism by defining a new Maven profile flaky-test-retry in the root pom.xml. This profile configures the maven-surefire-plugin to run standard tests and flaky tests separately, retrying the latter up to three times. The profile is activated in several sub-module pom.xml files using the contains.flaky.tests property, and several tests in AbstractA2AServerTest.java are annotated with @Tag("flaky"). There are no review comments, and I have no feedback to provide.

@kabir
Copy link
Copy Markdown
Collaborator Author

kabir commented Jun 1, 2026

/gemini review

Copy link
Copy Markdown
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 introduces a retry mechanism for flaky tests by defining a new Maven profile flaky-test-retry in the root pom.xml and tagging several tests in AbstractA2AServerTest.java as @Tag("flaky"). However, the reviewer identified a critical issue: Maven profile activation occurs before POM properties are processed, meaning the profile will never be activated by the <contains.flaky.tests> property defined in the submodules. To resolve this, the reviewer suggested making the profile active by default and controlling the execution behavior via property overrides in the submodules.

Comment thread pom.xml
Comment thread reference/grpc/pom.xml Outdated
Comment thread reference/jsonrpc/pom.xml Outdated
Comment thread reference/rest/pom.xml Outdated
Comment thread tests/multiversion/grpc/pom.xml Outdated
Comment thread tests/multiversion/jsonrpc/pom.xml Outdated
Comment thread tests/multiversion/rest/pom.xml Outdated
@kabir
Copy link
Copy Markdown
Collaborator Author

kabir commented Jun 1, 2026

/gemini review

Copy link
Copy Markdown
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 introduces a mechanism to retry flaky tests. A new Maven profile flaky-test-retry is added to pom.xml, which is activated in modules containing a .flaky-tests-marker file. This profile configures the maven-surefire-plugin to run non-flaky tests first, and then run flaky tests with up to three retries. Marker files have been added to several test modules, and the @Tag("flaky") annotation has been applied to several flaky tests in AbstractA2AServerTest.java. There are no review comments, and I have no additional feedback to provide.

@kabir kabir force-pushed the rerun-flaky-tests branch from ef4f4dc to 53ed9b2 Compare June 2, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant