'Why tests with Minio fail?

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.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source