Skip to content

Fix flaky bundle tests. #547

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 2 commits into from
Jul 17, 2021
Merged

Fix flaky bundle tests. #547

merged 2 commits into from
Jul 17, 2021

Conversation

wu-hui
Copy link
Contributor

@wu-hui wu-hui commented Jul 16, 2021

They are flaky because Android SDK does not guarantee all progress callbacks are complete before the task resolves.

Whether or not it should guarantee this is another topic.

@google-cla google-cla bot added the cla: yes label Jul 16, 2021
@wu-hui wu-hui added the tests-requested: quick Trigger a quick set of integration tests. label Jul 16, 2021
@@ -65,6 +65,15 @@ std::string CreateTestBundle(Firestore* db) {
return CreateBundle(db->app()->options().project_id());
}

void SetPromiseValueWhenUpdateIsFinal(
LoadBundleTaskProgress progress,
std::promise<void>& final_update_received) {

Choose a reason for hiding this comment

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

⚠️ Lint warning: Is this a non-const reference? If so, make const or use a pointer: std::promise<void>& final_update_received

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: please include <future> (you might need to add a // NOLINT(build/c++11) comment to it).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is already included, it is already used by one other test.

@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. and removed tests-requested: quick Trigger a quick set of integration tests. labels Jul 16, 2021
@github-actions
Copy link

github-actions bot commented Jul 16, 2021

✅  Integration test succeeded!

Requested by @wu-hui on commit 54849d0
Last updated: Fri Jul 16 19:06 PDT 2021
View integration test log & download artifacts

@wu-hui wu-hui requested a review from var-const July 16, 2021 19:43
@github-actions github-actions bot added the tests: succeeded This PR's integration tests succeeded. label Jul 16, 2021
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Jul 16, 2021
@jonsimantov
Copy link
Contributor

They are flaky because Android SDK does not guarantee all progress callbacks are complete before the task resolves.

Whether or not it should guarantee this is another topic.

Is this the issue that will be fixed in the next Android release? If so, we should revert this PR after that fix goes in (and we update to that dependency).

@@ -65,6 +65,15 @@ std::string CreateTestBundle(Firestore* db) {
return CreateBundle(db->app()->options().project_id());
}

void SetPromiseValueWhenUpdateIsFinal(
LoadBundleTaskProgress progress,
std::promise<void>& final_update_received) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: please include <future> (you might need to add a // NOLINT(build/c++11) comment to it).

@var-const var-const assigned wu-hui and unassigned var-const Jul 16, 2021
@wu-hui
Copy link
Contributor Author

wu-hui commented Jul 17, 2021

They are flaky because Android SDK does not guarantee all progress callbacks are complete before the task resolves.
Whether or not it should guarantee this is another topic.

Is this the issue that will be fixed in the next Android release? If so, we should revert this PR after that fix goes in (and we update to that dependency).

We have not decided whether or not we will change Android yet..there are arguments against it. Will revert this PR if that is what we end up doing.

@wu-hui wu-hui merged commit 54849d0 into main Jul 17, 2021
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. tests: succeeded This PR's integration tests succeeded. and removed tests: succeeded This PR's integration tests succeeded. labels Jul 17, 2021
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Jul 17, 2021
@firebase firebase locked and limited conversation to collaborators Aug 16, 2021
@jonsimantov jonsimantov deleted the wuandy/FlakyBundleTests branch December 22, 2021 22:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes tests: succeeded This PR's integration tests succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants