-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[release/6.0] Don't create multiple large files at the same time #63032
[release/6.0] Don't create multiple large files at the same time #63032
Conversation
* move existing large file tests into a separate type (no code changes) * don't run the large file tests in parallel * use FileOptions.DeleteOnClose to ensure that each test removes it's own file use single large file to test File.ReadAllBytes and ile.ReadAllBytesAsync for both limits
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsBackport of #60606 and #62519. Customer ImpactNone, this is required to have a clean CI in 6.0 branch. TestingChanges have been tested in main for a while. RiskLow.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for backporting the fixes @jozkee !
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
} | ||
|
||
[CollectionDefinition("NoParallelTests", DisableParallelization = true)] | ||
public partial class NoParallelTests { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't actually need this since we already have the same one here which you can include instead: https://github.com/dotnet/runtime/blob/release/6.0/src/libraries/Common/tests/System/Xml/DisableParallelization.cs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah looks like it is already that way in main, you'll need to include the file in the .csproj so it works:
runtime/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj
Line 218 in 1c09d36
<Compile Include="$(CommonTestPath)TestUtilities\System\DisableParallelization.cs" Link="Common\TestUtilities\System\DisableParallelization.cs" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File src\libraries\Common\tests\TestUtilities\System\DisableParallelization.cs
doesn't exists in release/6.0.
I added the class here because that's how we were doing it prior to #62132.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it was in a different path in release/6.0 (see the linked file in my first comment), but this is just a cosmetic issue so fine if we keep what you have :)
{ | ||
using FileStream fs = new (GetTestFilePath(), FileMode.Create, FileAccess.Write, FileShare.Read, 4096, FileOptions.DeleteOnClose); | ||
|
||
foreach (long lengthOverLimit in new long[] { Array.MaxLength + 1L, int.MaxValue + 1L }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need to get rid of this case because it's an edge case that isn't fixed in 6.0; see: #61519.
foreach (long lengthOverLimit in new long[] { Array.MaxLength + 1L, int.MaxValue + 1L }) | |
foreach (long lengthOverLimit in new long[] { int.MaxValue + 1L }) |
Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
Backport of #60606 and #62519.
Move tests that create large files (~4 gb) to OuterLoop and disables parallelization to avoid running into out of memory and time out errors.
Customer Impact
None, this is required to have a clean CI in 6.0 branch.
Testing
Changes have been tested in main for a while.
Risk
Low.