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

[NRBF] skip the most time-consuming test case for non-Release builds to avoid timeouts for checked builds #110550

Merged
merged 5 commits into from
Dec 12, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ public NonSeekableStream(byte[] buffer) : base(buffer) { }

public static IEnumerable<object[]> GetCanReadArrayOfAnySizeArgs()
{
foreach (int size in new[] { 1, 127, 128, 512_001, 512_001 })
foreach (int size in new[] { 1, 127, 128, 512_001 })
Copy link
Member

Choose a reason for hiding this comment

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

Is 512_001 particularly interesting value to test for some reason?

Would it be simpler to just change 512_001 to something smaller, like 20_001?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nothing in particular, I am going to apply your suggestion.

{
yield return new object[] { size, true };
yield return new object[] { size, false };

// It's the most time-consuming test case, skip it for the non-Release builds.
if (size != 512_001 || PlatformDetection.IsReleaseRuntime)
{
yield return new object[] { size, false };
}
}
}

Expand Down
Loading