Skip to content

Fix flaky RTDB tests due to increment operations. #2466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 20, 2019

Conversation

mikelehen
Copy link
Contributor

The introduction of tests that try to send increment operations to the backend has resulted in test flakiness. Basically the emulator rejects these as invalid operations and closes the connection. The client automatically reconnects, so usually this doesn't matter. But the SDK intentionally doesn't tolerate disconnects in the middle of a transaction, so if the disconnect happens to happen during a transaction test, then the test will fail.

I'm avoiding the problem by isolating the increment tests better (use an isolated instance of RTDB and ensures it remains offline so it doesn't even try to send the requests to the emulator).

I've opened b/146657568 to track cleaning this up once the emulator supports increment operations.

The introduction of tests that try to send increment operations to the backend has resulted in test flakiness.  Basically the emulator rejects these as invalid operations and closes the connection.  The client automatically reconnects, so _usually_ this doesn't matter.  But the SDK intentionally doesn't tolerate disconnects in the middle of a transaction, so if the disconnect happens to happen during a transaction test, then the test will fail.

I'm avoiding the problem by isolating the increment tests better (use an isolated instance of RTDB and ensures it remains offline so it doesn't even try to send the requests to the emulator).

I've opened b/146657568 to track cleaning this up once the emulator supports increment operations.
@mikelehen mikelehen merged commit 88734fd into master Dec 20, 2019
@mikelehen
Copy link
Contributor Author

Thanks Jeff!

@mikelehen mikelehen deleted the mikelehen/fix-flaky-rtdb-tests branch December 20, 2019 20:20
@hsubox76 hsubox76 added this to the next milestone Jan 7, 2020
@firebase firebase locked and limited conversation to collaborators Jan 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants