Uh oh!
There was an error while loading. Please reload this page.
[tests] add checks if long paths supported - #3543
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
6c4f171 to
dba0964Comparejonathanpeppers
commented
Aug 27, 2019
bec3165 to
878aec0CompareTo see a build where I forced the Windows tests to run on the broken agent: http://build.azdo.io/2985000
The key seemed to be using 255 as a length for the filename, since there is still a limit on file name length in addition to
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation |
| Assert.Ignore ("This environment supports long paths"); | ||
| } | ||
| var file = NewFile (fileName: "foo".PadRight (250, 'N')); | ||
| var file = NewFile (fileName: "foo".PadRight (255, 'N')); |
There was a problem hiding this comment.
This might be going slightly toward asinine territory, but should we P/Invoke GetVolumeInformation() (pinvoke.net) to get the appropriate maximumComponentLength value?
There was a problem hiding this comment.
Or, should this use FIlesTests.MaxFileName for consistency?
There was a problem hiding this comment.
I think the p/invoke is probably taking it too far, I moved this const to BaseTest so it could just be used everywhere.
Uh oh!
There was an error while loading. Please reload this page.
Context: http://build.azdo.io/2971289 Our `MaxPathTests` seem to be failing on a specific build machine: `DDMBLDW137`. I suspect this machine has long paths enabled. I added a check that attempts to write a long path, and if it succeeds we can `Assert.Ignore` these tests appropriately. A filename can only be 255 characters, so I added a constant for this value so the various tests can use it.
Temporarily require `$(Agent.Name)` = `DDMBLDW137`
This reverts commit 878aec0.
e62890b to
4080e03CompareContext: http://build.azdo.io/2971289 Our `MaxPathTests` (a3009f7) seem to be failing on a specific build machine: DDMBLDW137. I suspect this machine has long paths enabled. I added a check that attempts to write a long path, and if it succeeds we can `Assert.Ignore()` these tests appropriately. A filename can only be 255 characters, so I added a constant for this value so the various tests can use it.


Context: http://build.azdo.io/2971289
Our
MaxPathTestsseem to be failing on a specific build machine:DDMBLDW137. I suspect this machine has long paths enabled.I added a check that attempts to write a long path, and if it succeeds
we can
Assert.Ignorethese tests appropriately.