-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Resolve flaky firestore tests #17428
Copy link
Copy link
Open
Labels
triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Metadata
Metadata
Assignees
Labels
triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Type
Fields
Give feedbackNo fields configured for issues without a type.
The Firestore watch/listener system tests (test_watch_document, test_watch_collection, test_watch_query, and test_watch_query_order) currently rely on hardcoded sleep(0.2) delays and polling loops to coordinate snapshot updates.
These delays are fragile, highly susceptible to environmental latency/slow networks, and can cause test flakiness. We should investigate replacing these arbitrary polling loops with a robust, event-driven synchronization mechanism (e.g., using threading.Event or callback signals) that yields immediately upon receiving the expected snaps.