[System] Implement a helper function to create unique temporary directories and use...
commit632bb59b211fbd53dbbc31457edc1a66e153ae52
authorRolf Bjarne Kvinge <rolf@xamarin.com>
Tue, 4 Dec 2018 15:43:23 +0000 (4 16:43 +0100)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 4 Dec 2018 15:43:23 +0000 (4 16:43 +0100)
tree22bf167a52f539be93536b0e718ebafaaf08a705
parent18fdc10cc1f96c4a689cd4b7aa07d459500a78af
[System] Implement a helper function to create unique temporary directories and use it in tests. (#11831)

While working on PR #11829 I stress-tested the tests by running multiple test
runs in parallel, and it turned out that many tests were not parallel-safe,
because they used the same temporary file names and ended up stomping on
eachother.

So I implemented a helper method that creates a guaranteed unique temporary
directory, and I've changed all tests to use this new helper method.
15 files changed:
mcs/class/System/System_test.dll.sources
mcs/class/System/Test/Microsoft.CSharp/CSharpCodeProviderTest.cs
mcs/class/System/Test/System.CodeDom.Compiler/TempFileCollectionCas.cs
mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs
mcs/class/System/Test/System.Configuration/ConfigXmlDocumentTest.cs
mcs/class/System/Test/System.Configuration/ConfigurationExceptionTest.cs
mcs/class/System/Test/System.Diagnostics/EventLogTest.cs
mcs/class/System/Test/System.Diagnostics/FileVersionInfoTest.cs
mcs/class/System/Test/System.IO/FileSystemWatcherTest.cs
mcs/class/System/Test/System.Net.Mail/SmtpClientTest.cs
mcs/class/System/Test/System.Net/FileWebRequestTest.cs
mcs/class/System/Test/System.Net/FileWebResponseTest.cs
mcs/class/System/Test/System.Net/FtpWebRequestTest.cs
mcs/class/System/Test/System.Net/WebClientTest.cs
mcs/class/test-helpers/PathHelpers.cs [new file with mode: 0644]