Skip to content

test(auth): fix flaky refreshCredentialsIfRequired_blockingMultiThread test - #14704

Open
lqiu96 wants to merge 2 commits into
mainfrom
fix/auth-cab-blocking-multithread-12573
Open

lqiu96 wants to merge 2 commits into
mainfrom
fix/auth-cab-blocking-multithread-12573

Conversation

@lqiu96

@lqiu96 lqiu96 commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Fixes: #12573

@lqiu96
lqiu96 requested a review from whowes October 20, 2026 19:32

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request enhances the multi-threaded tests in ClientSideCredentialAccessBoundaryFactoryTest.java by introducing a CountDownLatch to coordinate concurrent threads and prevent race conditions during token refresh. The feedback recommends introducing a trackClockCalls flag to prevent the latch from being prematurely decremented during the initial token fetch, ensuring that clock calls are only tracked during the concurrent refresh phase.

@lqiu96
lqiu96 marked this pull request as ready for review October 20, 2026 19:47
@lqiu96
lqiu96 requested review from a team as code owners October 20, 2026 19:47
@lqiu96
lqiu96 force-pushed the fix/auth-cab-blocking-multithread-12573 branch from 543e428 to 1aa111f Compare October 20, 2026 19:59

@whowes whowes 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

+ "gidhycxS86dxpEljnOMCw8CKoUBd5I880IUahEiUltk7OLJYS/Ts1wbn3kPOVX3wyJs8WBDtBkFrDHW2ezth2QJ"
+ "ADj3e1YhMVdjJW5jqwlD/VNddGjgzyunmiZg0uOXsHXbytYmsA545S8KRQFaJKFXYYFo2kOjqOiC1T2cAzMDjCQ"
+ "==\n-----END PRIVATE KEY-----\n";
+ "4Az2ZkmeuN6Fk/y9H+Lcb2pskJIXjrL533vrDWGOC48LrsThMQPv8cxBky8HFSEklPpkfTF95tpD43iVwJRB/GrCtGTw65IfJ4/tI09h6zGc4yqvIo1cHX/LQ+SxKLGyir/dQM925rGt/VojxY5ryJR7GLbCzxPnJm/oQJBANwOCO6D2hy1LQYJhXh7O+RLtA/tSnT1xyMQsGT+uUCMiKS2bSKx2wxo9k7h3OegNJIu1q6nZ6AbxDK8H3+d0dUCQQDTrPSXagBxzp8PecbaCHjzNRSQE2in81qYnrAFNB4o3DpHyMMY6s5ALLeHKscEWnqP8Ur6X4PvzZecCWU9BKAZAkAutLPknAuxSCsUOvUfS1i87ex77Ot+w6POp34pEX+UWb+u5iFn2cQacDTHLV1LtE80L8jVLSbrbrlH43H0DjU5AkEAgidhycxS86dxpEljnOMCw8CKoUBd5I880IUahEiUltk7OLJYS/Ts1wbn3kPOVX3wyJs8WBDtBkFrDHW2ezth2QJADj3e1YhMVdjJW5jqwlD/VNddGjgzyunmiZg0uOXsHXbytYmsA545S8KRQFaJKFXYYFo2kOjqOiC1T2cAzMDjCQ==\n"

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.

Nit: did the content change here? This seemed more readable before the reformat

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this looks to be from the formatter. not sure what happened but perhaps this file wasn't touched in a while

@lqiu96
lqiu96 enabled auto-merge (squash) October 21, 2026 01:02
@lqiu96 lqiu96 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 21, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 21, 2026

This branch has not been deployed

No deployments
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.

[google-auth-library-java] Flaky Test: ClientSideCredentialAccessBoundaryFactoryTest.refreshCredentialsIfRequired_blockingMultiThread

3 participants