talaia-labs / rust-teos

The Eye of Satoshi - Lightning Watchtower
https://talaia.watch
MIT License
128 stars 62 forks source link

Hitting the fd limit again when running tests (aka Too many open files) #165

Closed sr-gi closed 1 year ago

sr-gi commented 1 year ago

Depending on the OS, the file descriptor limit may be hit when running teos tests.

This is, in part, due to the tests in the watchtower-plugin that use httpmock::MockServer which spawns up to 25 servers when running the test suite. The issue can be patched in many ways, such as:

In my personal case, I've gone for the first option, given that macOS has pretty default maxfiles (i.e. 256). This will become an issue if the fd limit is hit in other systems, like what happened with #119. We may like to consider an alternative option or even replace httpmock::MockServer with another mocking solution.