AmadeusITGroup / kassette

kassette is a development server, used mainly for testing, which proxies requests and is able to easily manage local mocks.
MIT License
9 stars 15 forks source link

Error: Client network socket disconnected before secure TLS connection was established #392

Open Arthoo opened 2 years ago

Arthoo commented 2 years ago

Hello,

We have started using Kassette together with Playwright. When we run it on Jenkins with multiple workers (lot's of concurrent requests) we get this error:

Error: Client network socket disconnected before secure TLS connection was established

However, if we bypass Kassette we don't have this.

Do you know if this is a known limitation or if there's some configuration we could do to avoid having this error?

divdavem commented 2 years ago

Hello,

Thank you for your interest in kassette and for reporting this issue.

To answer your question, this is not a known limitation. I cannot tell you how to solve it, it has to be investigated more in depth to see how it happens. If you give us an easy way to reproduce it (in a sample repository), we could have a look at it in more details.

If you think it is linked to the high number of requests, you could perhaps run multiple instances of kassette (for example: one per worker, which can be started by playwright with worker-scoped fixtures) so each instance processes less requests. This gives the extra benefit of being able to configure kassette differently depending on the playwright test that is being run (e.g. using different mocks for different tests).

Arthoo commented 2 years ago

Hello,

Thank you for your answer. We are already using the worker-scoped fixtures. We have tried reducing the number of workers from 15 to 2 which does help but it is not a good solution in the long term as it would take too long to run all tests as we continue adding more.

For now we have bypassed Kassette but we will try to investigate this issue further when we have advanced more with our tests so we can provide you with more details.