Skip to content

chore(firestore): prime IT backend once per JVM and increase pipeline seed timeout - #15035

Merged
jinseopkim0 merged 1 commit into
mainfrom
chore/firestore-it-setup-timeout
Nov 16, 2026
Merged

jinseopkim0 merged 1 commit into
mainfrom
chore/firestore-it-setup-timeout

Conversation

@jinseopkim0

Copy link
Copy Markdown
Contributor

ITBaseTest.backendPrimed was declared as an instance field rather than static, causing JUnit 4 to create a watch stream and prime the database before every @Test method instead of once per JVM. Make backendPrimed static volatile (synchronized with listener cleanup in finally) and increase the per-document seed write timeout in ITPipelineTest.testCollectionWithDocs from 5s to 30s to prevent transient @Before setup timeouts against named databases.

b/580634723

@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 introduces thread-safe priming of the test backend in ITBaseTest by making backendPrimed static and volatile, wrapping the initialization logic in a synchronized block, and ensuring listener cleanup in a finally block. Additionally, the timeout in ITPipelineTest is increased from 5 to 30 seconds. The reviewer notes that since backendPrimed is a global static boolean, only the first database used in the test suite will be primed, while subsequent databases will skip priming. To resolve this and prevent transient timeouts, the reviewer suggests tracking primed databases using a static set of database IDs.

@jinseopkim0
jinseopkim0 marked this pull request as ready for review November 16, 2026 16:31
@jinseopkim0
jinseopkim0 requested review from a team as code owners November 16, 2026 16:31
@jinseopkim0
jinseopkim0 requested a review from wu-hui November 16, 2026 16:32
@jinseopkim0
jinseopkim0 merged commit b33bf47 into main Nov 16, 2026
206 checks passed
@jinseopkim0
jinseopkim0 deleted the chore/firestore-it-setup-timeout branch November 16, 2026 23:26
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.

2 participants