Flaky Test in RecentBlogPostsQueryTests
https://github.com/OrchardCMS/OrchardCore/actions/runs/15701944683/job/44238626123
It's not that test alone, others are also failing.
See from https://github.com/OrchardCMS/OrchardCore/pull/18043#issuecomment-2978490764
I've debugged this error and it happens because background tasks are updating the index document concurrently to each other and to probably to deferred tasks as well.
@MikeAlhayek Access to the index document must be synchronized somehow.
E.g. here is the error caused by the two background tasks indexing-initialize and rebuild-indexes running concurrently:
@gvkries can we revert the affected PR, then we could add it again with extensive testing, because flaky tests are annoying, I spend more than 30 minutes to make my PR pass. Coz I need to re-run the failing tests all the time
@hishamco I don't think that is an option, the related PR is massive and issues are kind of expected because of that 🤗
That's why we need to do extensive tests, especially for massive PR That's why @Piedone all the time mentioned tests as an essential thing we need to do, especially for OC 3.0.0
So let's think about a proper solution for the current case, instead of breaking the build for new PRs
@MikeAlhayek Access to the index document must be synchronized somehow.
This PR will fix that https://github.com/OrchardCMS/OrchardCore/pull/18052
This PR will fix that https://github.com/OrchardCMS/OrchardCore/pull/18052
The build is fail
The build is fail
Its the test that is failing with a different issue. Same issue as this PR is having.
This is fixed by #18052 and #18054.