为什么Minio的测试失败?

发布于 2025-01-24 11:04:16 字数 290 浏览 2 评论 0原文

我使用Nestjs开发,我的服务器使用minio存储文件。由于某种原因,当我与Jest进行E2E测试时 - 大多数时间只有一个包括minio上传的测试成功,而其他包括Minio上传的测试因超时而导致失败(默认超时, 5000 ms)。我知道我可以增加超时,但我想我稍后会再次面对更多测试。似乎由于某种原因,当有多个上传请求时,minioclient对象变得较慢。

有没有更好的方法来解决它,而不是增加超时?

提前致谢。

I develop with NestJS and my server uses Minio to store files. For some reason, when I do E2E tests with jest - most of the times only one test that include Minio upload succeeds, while the other tests that include Minio upload fail due to timeout (the default timeout which is 5000 ms). I know I can increase the timeout but I think I will just face it again later on when I will have more tests. It seems like for some reason the MinioClient object becomes slower when there are multiple upload requests.

Is there a better way to solve it than increasing the timeout?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文