Fixing timing issue with FileActivity's loading dialog show and dismiss#16296
Fixing timing issue with FileActivity's loading dialog show and dismiss#16296alperozturk96 merged 3 commits intomasterfrom
Conversation
This timing issue was reproducible when testing RemoveFilesDialogFragment#removeFiles and sporadically "in the wild". However, no solution offered so far Signed-off-by: Philipp Hasper <vcs@hasper.info>
Before dismissing the dialog, we need to wait for a potentially pending transaction. As showing the dialog also includes the dismissing of prior instances, we need to wait there as well. Both is needed to satisfy the test case added in the previous commit. Otherwise, the dialog might be shown after it was meant to be dismissed already. This issue was observed when testing RemoveFilesDialogFragment's removeFiles() and also sporadically "in the wild". Signed-off-by: Philipp Hasper <vcs@hasper.info>
…sion Before that, when starting individual tests from the command line or from inside the IDE, they could fail because a dialog asking for the permission to post notifications was blocking the view. While we are on it, added a small explanation to the other existing rule. Without that explanation it might be unclear why this is not also done via the same GrantPermissionRule used for the notifications. Signed-off-by: Philipp Hasper <vcs@hasper.info>
|
blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed. |
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/16296.apk |
|
/backport to stable-3.35 |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |

Original PR: #16145
Before dismissing the dialog, we need to wait for a potentially pending transaction. As showing the dialog also includes the dismissing of prior instances, we need to wait there as well.
Both is needed to satisfy the test case added in the previous commit.
Otherwise, the dialog might be shown after it was meant to be dismissed already. This issue was observed when testing RemoveFilesDialogFragment's removeFiles() and also sporadically "in the wild" when using the app productively
If you want to see for yourself, first checkout the test commit and see the test fail. Then checkout the fix commit and see the test succeed