mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 08:44:29 +08:00
fix(tests): 解决测试清理期间的目录删除异常
- 在YamlConfigLoaderAllOfTests的清理方法中添加try-catch块 - 忽略测试拆解期间的目录删除失败异常 - 防止测试因权限或文件锁定问题而意外失败
This commit is contained in:
parent
389f97b949
commit
cfd4ae97d3
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user