fix(tests): 解决测试清理期间的目录删除异常

- 在YamlConfigLoaderAllOfTests的清理方法中添加try-catch块
- 忽略测试拆解期间的目录删除失败异常
- 防止测试因权限或文件锁定问题而意外失败
This commit is contained in:
GeWuYou 2026-04-17 16:55:49 +08:00
parent 389f97b949
commit cfd4ae97d3

View File

@ -60,7 +60,14 @@ public sealed class YamlConfigLoaderAllOfTests
if (!string.IsNullOrEmpty(_rootPath) &&
Directory.Exists(_rootPath))
{
Directory.Delete(_rootPath, true);
try
{
Directory.Delete(_rootPath, true);
}
catch (Exception)
{
// Ignore cleanup failures in test teardown
}
}
}