Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Robinson <arobins@microsoft.com>2021-04-03 09:26:10 +0300
committerGitHub <noreply@github.com>2021-04-03 09:26:10 +0300
commitc769b4755c04afde557dca8d4f727fbba2c52b40 (patch)
tree35ff58dbf980c48cfc08c258b45fb0cd8d78102b /src/tests/baseservices
parent8d14691123db3ebf9a99d17d0b2114e687b82345 (diff)
Remove duplicate WaitHandle tests from src/tests (#50677)
Diffstat (limited to 'src/tests/baseservices')
-rw-r--r--src/tests/baseservices/threading/waithandle/waitall/emptyarray.cs40
-rw-r--r--src/tests/baseservices/threading/waithandle/waitall/nullarray.cs51
-rw-r--r--src/tests/baseservices/threading/waithandle/waitall/nullarraymember.cs40
-rw-r--r--src/tests/baseservices/threading/waithandle/waitall/nullarraymember.csproj9
-rw-r--r--src/tests/baseservices/threading/waithandle/waitall/waitallemptyarray.csproj9
-rw-r--r--src/tests/baseservices/threading/waithandle/waitall/waitallnullarray.csproj9
-rw-r--r--src/tests/baseservices/threading/waithandle/waitany/emptyarray.cs40
-rw-r--r--src/tests/baseservices/threading/waithandle/waitany/nullarray.cs40
-rw-r--r--src/tests/baseservices/threading/waithandle/waitany/nullarraymember.cs40
-rw-r--r--src/tests/baseservices/threading/waithandle/waitany/nullarraymemberwaitany.csproj9
-rw-r--r--src/tests/baseservices/threading/waithandle/waitany/waitanyemptyarray.csproj9
-rw-r--r--src/tests/baseservices/threading/waithandle/waitany/waitanynullarray.csproj9
-rw-r--r--src/tests/baseservices/threading/waithandle/waithandlecommon.cs15
13 files changed, 0 insertions, 320 deletions
diff --git a/src/tests/baseservices/threading/waithandle/waitall/emptyarray.cs b/src/tests/baseservices/threading/waithandle/waitall/emptyarray.cs
deleted file mode 100644
index f6294a64278..00000000000
--- a/src/tests/baseservices/threading/waithandle/waitall/emptyarray.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using System.Threading;
-//Regression for DevDiv Bugs 1142
-class Duplicates
-{
- static int Main()
- {
- int retCode = 99;
-
- WaitHandle[] waitHandles = {};
-
- // Can't catch exception in v2.0. Should be fixed in Post-Orcas. VSWhidbey 543816
- try
- {
- Console.WriteLine("Before WaitAll");
- WaitHandle.WaitAll(waitHandles, 5000);
- Console.WriteLine("After WaitAll");
- }
- catch (ArgumentException)
- {
- retCode = 100;
- }
- catch (Exception ex)
- {
- Console.WriteLine("WaitAll threw unexpected Exception.");
- Console.WriteLine("WaitAll: {0}", ex);
- retCode = 98;
- }
-
- if (retCode ==100)
- Console.WriteLine("Test Passed");
- else
- Console.WriteLine("Test Failed");
-
- return retCode;
- }
-}
diff --git a/src/tests/baseservices/threading/waithandle/waitall/nullarray.cs b/src/tests/baseservices/threading/waithandle/waitall/nullarray.cs
deleted file mode 100644
index b3042b28756..00000000000
--- a/src/tests/baseservices/threading/waithandle/waitall/nullarray.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using System.Threading;
-//Regression for DevDiv Bugs 1142
-class Duplicates
-{
- static int Main()
- {
- int retCode = 99;
-
- // Console.WriteLine(Thread.CurrentThread.GetApartmentState());
-
- // Not supported (https://github.com/dotnet/runtime/issues/5059)
- // AppDomain.CurrentDomain.UnhandledException += Unhandled;
-
- WaitHandle[] waitHandles = null;
-
- // Can't catch exception in v2.0. Should be fixed in Post-Orcas. VSWhidbey 543816
- try
- {
- Console.WriteLine("Before WaitAll");
- WaitHandle.WaitAll(waitHandles, 5000);//, false);
- Console.WriteLine("After WaitAll");
- }
- catch (ArgumentNullException)
- {
- retCode = 100;
- }
- catch (Exception ex)
- {
- Console.WriteLine("WaitAll threw unexpected Exception.");
- Console.WriteLine("WaitAll: {0}", ex);
- retCode = 98;
- }
-
- if (retCode ==100)
- Console.WriteLine("Test Passed");
- else
- Console.WriteLine("Test Failed");
-
- return retCode;
- }
-
- // private static void Unhandled(object sender, UnhandledExceptionEventArgs args)
- // {
- // Exception e = (Exception) args.ExceptionObject;
- // Console.WriteLine("Unhandled reports: {0}", e);
- // }
-}
diff --git a/src/tests/baseservices/threading/waithandle/waitall/nullarraymember.cs b/src/tests/baseservices/threading/waithandle/waitall/nullarraymember.cs
deleted file mode 100644
index b280bc1bb93..00000000000
--- a/src/tests/baseservices/threading/waithandle/waitall/nullarraymember.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using System.Threading;
-
-class Duplicates
-{
- static int Main()
- {
- int retCode = 99;
-
- WaitHandle[] waitHandles = { new Mutex(), new Mutex(), null, new Mutex() };
-
- // Can't catch exception in v2.0. Should be fixed in Post-Orcas. VSWhidbey 543816
- try
- {
- Console.WriteLine("Before WaitAll");
- WaitHandle.WaitAll(waitHandles, 5000);
- Console.WriteLine("After WaitAll");
- }
- catch (ArgumentNullException)
- {
- retCode = 100;
- }
- catch (Exception ex)
- {
- Console.WriteLine("WaitAll threw unexpected Exception.");
- Console.WriteLine("WaitAll: {0}", ex);
- retCode = 98;
- }
-
- if (retCode ==100)
- Console.WriteLine("Test Passed");
- else
- Console.WriteLine("Test Failed");
-
- return retCode;
- }
-}
diff --git a/src/tests/baseservices/threading/waithandle/waitall/nullarraymember.csproj b/src/tests/baseservices/threading/waithandle/waitall/nullarraymember.csproj
deleted file mode 100644
index cfb99b0740e..00000000000
--- a/src/tests/baseservices/threading/waithandle/waitall/nullarraymember.csproj
+++ /dev/null
@@ -1,9 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="nullarraymember.cs" />
- </ItemGroup>
-</Project>
diff --git a/src/tests/baseservices/threading/waithandle/waitall/waitallemptyarray.csproj b/src/tests/baseservices/threading/waithandle/waitall/waitallemptyarray.csproj
deleted file mode 100644
index d8f30554d4d..00000000000
--- a/src/tests/baseservices/threading/waithandle/waitall/waitallemptyarray.csproj
+++ /dev/null
@@ -1,9 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="emptyarray.cs" />
- </ItemGroup>
-</Project>
diff --git a/src/tests/baseservices/threading/waithandle/waitall/waitallnullarray.csproj b/src/tests/baseservices/threading/waithandle/waitall/waitallnullarray.csproj
deleted file mode 100644
index 0012b6620cc..00000000000
--- a/src/tests/baseservices/threading/waithandle/waitall/waitallnullarray.csproj
+++ /dev/null
@@ -1,9 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="nullarray.cs" />
- </ItemGroup>
-</Project>
diff --git a/src/tests/baseservices/threading/waithandle/waitany/emptyarray.cs b/src/tests/baseservices/threading/waithandle/waitany/emptyarray.cs
deleted file mode 100644
index 6e2a99deeaf..00000000000
--- a/src/tests/baseservices/threading/waithandle/waitany/emptyarray.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using System.Threading;
-//Regression for DevDiv Bugs 1142
-class Duplicates
-{
- static int Main()
- {
- int retCode = 99;
-
- WaitHandle[] waitHandles = {};
-
- // Can't catch exception in v2.0. Should be fixed in Post-Orcas. VSWhidbey 543816
- try
- {
- Console.WriteLine("Before WaitAny");
- WaitHandle.WaitAny(waitHandles, 5000);
- Console.WriteLine("After WaitAny");
- }
- catch (ArgumentException)
- {
- retCode = 100;
- }
- catch (Exception ex)
- {
- Console.WriteLine("WaitAny threw unexpected Exception.");
- Console.WriteLine("WaitAny: {0}", ex);
- retCode = 98;
- }
-
- if (retCode ==100)
- Console.WriteLine("Test Passed");
- else
- Console.WriteLine("Test Failed");
-
- return retCode;
- }
-}
diff --git a/src/tests/baseservices/threading/waithandle/waitany/nullarray.cs b/src/tests/baseservices/threading/waithandle/waitany/nullarray.cs
deleted file mode 100644
index e1748504925..00000000000
--- a/src/tests/baseservices/threading/waithandle/waitany/nullarray.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using System.Threading;
-//Regression for DevDiv Bugs 1142
-class Duplicates
-{
- static int Main()
- {
- int retCode = 99;
-
- WaitHandle[] waitHandles = null;
-
- // Can't catch exception in v2.0. Should be fixed in Post-Orcas. VSWhidbey 543816
- try
- {
- Console.WriteLine("Before WaitAny");
- WaitHandle.WaitAny(waitHandles, 5000);
- Console.WriteLine("After WaitAny");
- }
- catch (ArgumentNullException)
- {
- retCode = 100;
- }
- catch (Exception ex)
- {
- Console.WriteLine("WaitAny threw unexpected Exception.");
- Console.WriteLine("WaitAny: {0}", ex);
- retCode = 98;
- }
-
- if (retCode ==100)
- Console.WriteLine("Test Passed");
- else
- Console.WriteLine("Test Failed");
-
- return retCode;
- }
-}
diff --git a/src/tests/baseservices/threading/waithandle/waitany/nullarraymember.cs b/src/tests/baseservices/threading/waithandle/waitany/nullarraymember.cs
deleted file mode 100644
index f19e361b9f0..00000000000
--- a/src/tests/baseservices/threading/waithandle/waitany/nullarraymember.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using System.Threading;
-
-class Duplicates
-{
- static int Main()
- {
- int retCode = 99;
-
- WaitHandle[] waitHandles = { new Mutex(), new Mutex(), null, new Mutex() };
-
- // Can't catch exception in v2.0. Should be fixed in Post-Orcas. VSWhidbey 543816
- try
- {
- Console.WriteLine("Before WaitAny");
- WaitHandle.WaitAny(waitHandles, 5000);
- Console.WriteLine("After WaitAny");
- }
- catch (ArgumentNullException)
- {
- retCode = 100;
- }
- catch (Exception ex)
- {
- Console.WriteLine("WaitAny threw unexpected Exception.");
- Console.WriteLine("WaitAny: {0}", ex);
- retCode = 98;
- }
-
- if (retCode ==100)
- Console.WriteLine("Test Passed");
- else
- Console.WriteLine("Test Failed");
-
- return retCode;
- }
-}
diff --git a/src/tests/baseservices/threading/waithandle/waitany/nullarraymemberwaitany.csproj b/src/tests/baseservices/threading/waithandle/waitany/nullarraymemberwaitany.csproj
deleted file mode 100644
index cfb99b0740e..00000000000
--- a/src/tests/baseservices/threading/waithandle/waitany/nullarraymemberwaitany.csproj
+++ /dev/null
@@ -1,9 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="nullarraymember.cs" />
- </ItemGroup>
-</Project>
diff --git a/src/tests/baseservices/threading/waithandle/waitany/waitanyemptyarray.csproj b/src/tests/baseservices/threading/waithandle/waitany/waitanyemptyarray.csproj
deleted file mode 100644
index d8f30554d4d..00000000000
--- a/src/tests/baseservices/threading/waithandle/waitany/waitanyemptyarray.csproj
+++ /dev/null
@@ -1,9 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="emptyarray.cs" />
- </ItemGroup>
-</Project>
diff --git a/src/tests/baseservices/threading/waithandle/waitany/waitanynullarray.csproj b/src/tests/baseservices/threading/waithandle/waitany/waitanynullarray.csproj
deleted file mode 100644
index 0012b6620cc..00000000000
--- a/src/tests/baseservices/threading/waithandle/waitany/waitanynullarray.csproj
+++ /dev/null
@@ -1,9 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="nullarray.cs" />
- </ItemGroup>
-</Project>
diff --git a/src/tests/baseservices/threading/waithandle/waithandlecommon.cs b/src/tests/baseservices/threading/waithandle/waithandlecommon.cs
deleted file mode 100644
index 5d6f42a70f9..00000000000
--- a/src/tests/baseservices/threading/waithandle/waithandlecommon.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using System.Threading;
-
-class Common
-{
- public static string GetUniqueName()
- {
- string sName = Guid.NewGuid().ToString();
- Console.WriteLine("Name created: " + sName);
- return sName;
- }
-}