farcaster-node icon indicating copy to clipboard operation
farcaster-node copied to clipboard

Tests: improve how processes are killed

Open LeoNero opened this issue 2 years ago • 1 comments

This PR does three things:

  • renames setup_clients to launch_farcasterd_instances
  • removes cleanup_processes and adds a struct FarcasterdProcess with a impl Drop; this has the advantage that processes will die even if tests fail, which was not happening before
  • improve the logic that cleans up processes; it had some problems that processes spawned by farcasterd were not being killed

Run the tests (force them to fail too), and in all cases check if any farcaster-related process is running in your machine.

LeoNero avatar Aug 30 '22 04:08 LeoNero

In #707 we took another approach to kill processes. I like the implementation of Drop to cleanup process, it's very rust way of thinking. Do you want to give it a shot and try to port your work based on the state of main?

h4sh3d avatar Oct 05 '22 16:10 h4sh3d

Superseded by #707

h4sh3d avatar Dec 15 '22 13:12 h4sh3d