Skip to content

Conversation

@AbgarSim
Copy link
Contributor

@AbgarSim AbgarSim commented Jan 11, 2026

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:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #4041

If you write sample code, please follow the samples format.

@AbgarSim AbgarSim requested review from a team as code owners January 11, 2026 19:25
@AbgarSim AbgarSim requested a review from jinseopkim0 January 11, 2026 19:25
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: bigquery Issues related to the googleapis/java-bigquery API. labels Jan 11, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @AbgarSim, 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 significantly upgrades the project's testing capabilities by integrating JUnit 5 and enabling parallel test execution. The primary goal is to enhance developer productivity and accelerate feedback loops by allowing tests to run concurrently, thereby reducing the overall test suite execution time.

Highlights

  • JUnit 5 Configuration: A new junit-platform.properties file has been added to configure JUnit 5 for the project.
  • Parallel Test Execution: Parallel test execution has been enabled for JUnit 5, allowing tests to run concurrently.
  • Fixed Parallelism Strategy: The parallel execution strategy is set to 'fixed' with a parallelism of 8 threads, optimizing test runtime.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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 introduces parallel test execution for JUnit 5 by adding a junit-platform.properties file. This is a great step towards speeding up the build. My review includes two suggestions to improve the parallel execution configuration. First, I recommend changing the method execution mode to same_thread to prevent potential race conditions in tests that are not thread-safe. Second, I suggest using a dynamic parallelism strategy instead of a fixed one to better adapt to different execution environments. These changes should make the parallel test execution more robust and efficient.

@@ -0,0 +1,7 @@
junit.jupiter.execution.parallel.enabled=true

junit.jupiter.execution.parallel.mode.default=concurrent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Setting junit.jupiter.execution.parallel.mode.default to concurrent will execute test methods within the same test class in parallel. This can introduce flakiness and hard-to-debug race conditions if tests share mutable state via instance fields. A safer default is same_thread, which executes methods within a class sequentially but still allows different test classes to run in parallel. Please ensure that tests are designed to be thread-safe at the method level before using concurrent mode.

junit.jupiter.execution.parallel.mode.default=same_thread

Copy link
Contributor Author

@AbgarSim AbgarSim Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So testing locally seems that this same_thread is not helping at all with the speed as opposed to concurrent, also running locally a couple of times I don't see any flake failures. Please advice if we can leave as is and change if there are actually flaky tests due to this @lqiu96

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I just tried this locally and I think it should be helping:

Without parallel:

[INFO] Reactor Summary for BigQuery Parent 2.57.2-SNAPSHOT:
[INFO]
[INFO] BigQuery Parent .................................... SUCCESS [  0.762 s]
[INFO] BigQuery ........................................... SUCCESS [02:29 min]
[INFO] Google Cloud BigQuery BOM .......................... SUCCESS [  0.003 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:31 min
[INFO] Finished at: 2026-01-12T17:22:00-05:00
[INFO] ------------------------------------------------------------------------

Parallel:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for BigQuery Parent 2.57.2-SNAPSHOT:
[INFO]
[INFO] BigQuery Parent .................................... SUCCESS [  0.695 s]
[INFO] BigQuery ........................................... SUCCESS [ 28.755 s]
[INFO] Google Cloud BigQuery BOM .......................... SUCCESS [  0.004 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  29.753 s
[INFO] Finished at: 2026-01-12T17:24:15-05:00
[INFO] ------------------------------------------------------------------------

I think there is quite a big speed up (especially for our GraalVM tests).

@lqiu96 lqiu96 changed the title feat:Add JUnit 5 and add parallel test execution ci: Enable parallel test execution Jan 12, 2026
@lqiu96 lqiu96 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 12, 2026
@lqiu96
Copy link
Member

lqiu96 commented Jan 12, 2026

/gcbrun

@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 12, 2026
@lqiu96
Copy link
Member

lqiu96 commented Jan 12, 2026

@AbgarSim resolved some flaky tests in a separate PR. If you pull the latest changes, the tests should pass now

@AbgarSim AbgarSim force-pushed the jupiter-parallel-exec branch 2 times, most recently from 52bb2fb to 6f8191d Compare January 12, 2026 22:09
@AbgarSim
Copy link
Contributor Author

@AbgarSim resolved some flaky tests in a separate PR. If you pull the latest changes, the tests should pass now

Rebased

@AbgarSim AbgarSim force-pushed the jupiter-parallel-exec branch from 6f8191d to 31a0eff Compare January 12, 2026 22:11
@lqiu96 lqiu96 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 12, 2026
@lqiu96
Copy link
Member

lqiu96 commented Jan 12, 2026

/gcbrun

@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 12, 2026
@lqiu96
Copy link
Member

lqiu96 commented Jan 12, 2026

Seems like we have a flaky test and some quota issue:

JUnit Jupiter:ITRemoteUDFTest:testRoutineRemoteUDF()
    MethodSource [className = 'com.google.cloud.bigquery.it.ITRemoteUDFTest', methodName = 'testRoutineRemoteUDF', methodParameterTypes = '']
    => com.google.cloud.bigquery.BigQueryException: An internal error occurred and the request could not be completed. This is usually caused by a transient issue. Retrying the job with back-off as described in the BigQuery SLA should solve the problem: https://cloud.google.com/bigquery/sla. If the error continues to occur please contact support at https://cloud.google.com/support. Error: 4316996

I'll re-run this in a bit and look to try and disable this test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the googleapis/java-bigquery API. size: xs Pull request size is extra small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants