-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Run automated tests on debug builds #11632
Copy link
Copy link
Open
Labels
affected-fewThis issue impacts only small number of customersThis issue impacts only small number of customersarea-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared frameworkIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared frameworkseverity-minorThis label is used by an internal toolThis label is used by an internal tooltask
Milestone
Metadata
Metadata
Assignees
Labels
affected-fewThis issue impacts only small number of customersThis issue impacts only small number of customersarea-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared frameworkIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared frameworkseverity-minorThis label is used by an internal toolThis label is used by an internal tooltask
Type
Fields
Give feedbackNo fields configured for Task.
My understanding is that our CI servers now only run automated tests against release builds. If that's the case, this means that the many Debug.Asserts throughout the AspNetCore repo are pretty worthless since we can only ever see an assertion failures by running tests or samples locally even the Debug.Asserts in the test projects themselves.
I think the best solution is to run our automated tests against debug builds. I'm not asking for all our testing to be done against debug builds, but nightly tests of debug builds would probably be a good idea.
@davidfowl suggested using critical logs to replace Debug.Asserts. That was definitely the right approach for #11624, but in a lot of places we assert currently we don't have a logger. There's also the problem that not all our tests will fail given a critical log, but a lot will.
Changing Debug.Asserts to Trace.Asserts seems like a somewhat reasonable idea, but not only does that create performance concerns, it could also potentially introduce new DoS vectors as @benaadams rightfully pointed out.