Update MoqVersion to latest#66540
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the centrally-managed Moq dependency version used across the repo’s test builds (via custom <Reference>→<PackageReference> resolution), aiming to pick up fixes/improvements from a much newer Moq release.
Changes:
- Bump
MoqVersionfrom4.10.0to4.20.72.
|
Looks like there might be some reaction needed in some of the MVC tests (
|
|
The path how we get there:
The reason we validate against
As you see, the validation result can be highly impacted by the implementation details of Moq and we should avoid that in the test altogether, IMO. Meanwhile, devlooped/moq#1672 |
79081e6 to
b178af7
Compare
|
We're still suffering from threadpool starvation, I think, but the update still feels like a good step forward.
We should still, IMO, find ways to improve this. That might require changes on Moq/Castle sides (castleproject/Core#743). Or alternatively, we try to simply reduce our usage of Moq whenever possible. |



This version of Moq is extremely old.
During the test run of Microsoft.AspNetCore.Mvc.TagHelpers.Test, I see lots of threadpool threads getting blocked:
This doesn't sound good, and might be cause of some of the flakiness we get.
Let's hope that the newer versions of Moq/Castle.Core are doing better job at not blocking threads.