Skip to content

kokoro: Execute test cases concurrently#263

Open
arjan-bal wants to merge 7 commits into
grpc:mainfrom
arjan-bal:parallel-test-execution
Open

kokoro: Execute test cases concurrently#263
arjan-bal wants to merge 7 commits into
grpc:mainfrom
arjan-bal:parallel-test-execution

Conversation

@arjan-bal

@arjan-bal arjan-bal commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Related Issue: b/526886100


Context & Summary

This change enables concurrent execution of test cases within the Security, LB, and DualStack test suites. Shifting from sequential execution to a parallelized model drastically reduces overall execution times and resolves the timeouts observed in our scheduled test runs.

The CSM suite remains unaffected and will continue to execute sequentially to prevent any shared resource conflicts.


Performance Improvements

Test Suite Concurrent jobs Before (mins) After (mins) Delta / Reduction (%)
Security 2 220 122 -44.5%
LB 2 281 182 -35.2%
DualStack 2 195 115 -41%
PSM Light 1 5 5 0%

Concurrency in LB suite on master is slightly reduced due to a long bootstrap generator test that runs at the end.


Test Runs

@arjan-bal arjan-bal marked this pull request as ready for review July 13, 2026 15:12
@arjan-bal arjan-bal requested a review from a team as a code owner July 13, 2026 15:12
@arjan-bal arjan-bal requested review from eshitachandwani, pawbhard and sergiitk and removed request for eshitachandwani July 13, 2026 15:12

@pawbhard pawbhard left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, Need One validation for failure case.

@sergiitk , DO you have any concerns as you were trying this earlier, else we can merge.
We will run for a week for these test suites and then enable for all with configurable parallelism

Comment thread .kokoro/psm_interop_kokoro_lib.sh Outdated
psm::tools::log "Finished ${test_suite} suite test: ${test_name}"
echo
done
# TODO(b/526886100): Make the parallelism configurable using a function

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Create a separate task for it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Filed b/535109852.

psm::tools::log "Running ${test_suite} suite test: ${test_name}" |& tee "${test_log}"
# Must be the last line.
"psm::${test_suite}::run_test" "${test_name}" |& tee -a "${test_log}"
local exit_code=0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we have a verify run with one of the test failing so we can check if that is handled correctly by the logic

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I injected an error to cause the dualstack test to fail and verified that the failure is reported correctly, however the the counter in the final log is 0

Failed test suites: 0

I'm looking into this.
Run : https://source.cloud.google.com/results/invocations/922f81cd-5083-45b8-8784-8b5716559e37

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.

3 participants