-
Notifications
You must be signed in to change notification settings - Fork 62
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
Flaky test: cancelAsFlow – io.realm.kotlin.test.common.notifications.RealmNotificationsTests #1574
Comments
Hmm, that looks new. I wonder if that is related to our scheduler changes? 🤔 |
I saw this fail on Github Actions as well |
Potentially related to #1582 |
Failed again here: https://github.com/realm/realm-kotlin/runs/19053315743 |
After more testing, I am now seeing logs that indicate that it is indeed our own callbacks that do not trigger:
This was after using unlimited buffers and |
After 7 successfull runs, I suddenly saw an error in
All of the flaky tests seems to be centered around our global Realm notifications. I am starting to suspect that Core has a bug there somewhere. Maybe it is related to us doing empty writes, which Core in some cases do not treat as a change? |
Another one that indicate it is the the flow changelistener not triggering: https://github.com/realm/realm-kotlin/actions/runs/7030468089
|
I think I found the root cause. This was the code in
And this is the docs for
This is exactly the case we have here. By using This caused our tests to continue, doing a write, which was then missed by the notifier because it was still starting up when the write completed. This is supported by these kinds of logs I got from the failed runs:
Switching to
I also discovered this issue that describes the problem in other similar cases: Kotlin/kotlinx.coroutines#1758 |
We have seen this test failing with the following stack trace
Observed here
The text was updated successfully, but these errors were encountered: