Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] WIN上完整测试会出现temp权限占用问题 #650

Open
ShaohonChen opened this issue Jul 19, 2024 · 2 comments
Open

[BUG] WIN上完整测试会出现temp权限占用问题 #650

ShaohonChen opened this issue Jul 19, 2024 · 2 comments
Assignees
Labels
🐛 bug Something isn't working

Comments

@ShaohonChen
Copy link
Contributor

ShaohonChen commented Jul 19, 2024

🐛 Bug description [Please make everyone to understand it]

在windows上进行单元测试时会出现temp文件占用问题,在MAC上测试未发现这个问题

推测原因是test\unit\conftest.py中setup_each函数删除时,上一个进程未完全执行完成或者资源未完成释放造成的。

🧑‍💻 Step to reproduce

=========================================================== short test summary info ===========================================================
ERROR test/unit/log/test_log.py::TestSwanLogInstall::test_write_logging_to_file - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程 无法访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
ERROR test/unit/log/test_log.py::TestSwanLogInstall::test_can_write_logging - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法 访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
ERROR test/unit/log/test_log.py::TestSwanLogInstall::test_write_sharding - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
ERROR test/unit/test_package.py::test_package_latest_version - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
ERROR test/unit/test_package.py::test_get_package_version - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
ERROR test/unit/test_package.py::test_get_host_web_env - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
ERROR test/unit/test_package.py::test_get_host_api_env - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
ERROR test/unit/test_package.py::test_get_user_setting_path - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
ERROR test/unit/test_package.py::test_get_project_url - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
ERROR test/unit/test_package.py::test_get_experiment_url - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
ERROR test/unit/test_package.py::TestGetKey::test_ok - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
ERROR test/unit/test_package.py::TestGetKey::test_no_file - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
ERROR test/unit/test_package.py::TestGetKey::test_no_host - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
ERROR test/unit/test_package.py::TestSaveKey::test_ok - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
ERROR test/unit/test_package.py::TestIsLogin::test_ok - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
ERROR test/unit/test_package.py::TestIsLogin::test_no_file - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
ERROR test/unit/test_package.py::TestIsLogin::test_wrong_host - PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'c:\\Users\\61169\\projects\\SwanLab\\test\\temp\\CPRbZ9rTyeuZ1Zr3...
=========================================== 107 passed, 11 skipped, 2 warnings, 17 errors in 39.76s =========================================== 
@ShaohonChen ShaohonChen added the 🐛 bug Something isn't working label Jul 19, 2024
@SAKURA-CAT
Copy link
Contributor

难顶,linux/mac下没有这个问题

@ShaohonChen ShaohonChen self-assigned this Jul 20, 2024
@ShaohonChen
Copy link
Contributor Author

这个目前只是测试问题,等晚点再修,优先级比较低

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants