Use random file names in the TZ tests (#50339)
authorTarek Mahmoud Sayed <tarekms@microsoft.com>
Mon, 29 Mar 2021 00:24:24 +0000 (17:24 -0700)
committerGitHub <noreply@github.com>
Mon, 29 Mar 2021 00:24:24 +0000 (17:24 -0700)
src/libraries/System.Runtime/tests/System/TimeZoneInfoTests.cs

index 05ae478..0e83906 100644 (file)
@@ -2469,7 +2469,7 @@ namespace System.Tests
         [InlineData("<+00>0<+01>,A/0,J365/25", 0, 0, false)]
         public static void NJulianRuleTest(string posixRule, int dayNumber, int monthNumber, bool shouldSucceed)
         {
-            string zoneFilePath = Path.GetTempPath() + "dotnet_tz";
+            string zoneFilePath = Path.GetTempPath() + Path.GetRandomFileName();
             using (FileStream fs = new FileStream(zoneFilePath, FileMode.Create))
             {
                 fs.Write(timeZoneFileContents.AsSpan());