From a2f1ae628620743a54beecadb9f03d2c6664e32a Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 4 Aug 2022 17:12:06 +0200 Subject: [PATCH] Make test more robust This helps especially on Windows. --- source/icu.net.tests/NativeMethods/DllResolverTests.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/icu.net.tests/NativeMethods/DllResolverTests.cs b/source/icu.net.tests/NativeMethods/DllResolverTests.cs index 98da3729..1457ef0c 100644 --- a/source/icu.net.tests/NativeMethods/DllResolverTests.cs +++ b/source/icu.net.tests/NativeMethods/DllResolverTests.cs @@ -18,7 +18,14 @@ public void TearDown() if (string.IsNullOrEmpty(_tempPath)) return; - Directory.Delete(_tempPath, true); + try + { + Directory.Delete(_tempPath, true); + } + catch (System.Exception) + { + // just ignore + } _tempPath = null; }