Skip to content
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

Adding a new test attribute "NoIterativeLeakTesting" that signals TestRunner to omit tests from our iterative leak tests #3349

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

bspratt
Copy link
Member

@bspratt bspratt commented Jan 27, 2025

Applied to several tests with long execution times. Those test still run in other test phases, just not the leak test phase where they crowd out other tests due to time constraints.

…tRunner to omit tests from our iterative leak tests. Applied to several tests with long execution times. Those test still run in other test phases, just not the leak test phase where they crowd out other tests due to time constraints.
@chambm
Copy link
Member

chambm commented Jan 28, 2025

Good to have this attribute!

I'm not sure whether we want to disable leak testing on the paste and library import tests. I know those are woefully long running for functional tests, but do we have other shorter tests that are going to exercise most of the code that the paste and library import ones do?

EncyclopeDia is a good one to exclude for sure. I think we can also exclude all the DiaSearch and DdaSearch tests: most of the execution time is there running the search and percolator, and the rest of it should already be leak-covered by other tests.

/// (e.g. memory hungry or excessively time consuming given that it has to be run many times for leak detection)
/// </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public sealed class NoIterativeLeakTestingAttribute : Attribute
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we give this attribute a shorter name. Maybe "NoLeakTestingAttribute"?
Also, can we give it a default zero-argument constructor which sets the Reason to "TestExclusionReason.EXCESSIVE_TIME"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm open to a rename, but I do think there's value in having to declare why it's being set.

@bspratt
Copy link
Member Author

bspratt commented Jan 28, 2025

I'm not sure whether we want to disable leak testing on the paste and library import tests. I know those are woefully long running for functional tests, but do we have other shorter tests that are going to exercise most of the code that the paste and library import ones do?

I suppose we can run it through code coverage to be certain. And possibly the paste test, at least, could be broken down into multiple tests some of which might be suitable candidates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants