knuu icon indicating copy to clipboard operation
knuu copied to clipboard

feat: remove test resources on sig kill only in debug mode

Open tty47 opened this issue 1 year ago • 1 comments

as we have in this PR: https://github.com/celestiaorg/knuu/pull/296

we have reconsidered it and we'll do the following:

  • by default, we won't remove the resources on sig kill
  • in debug mode, we will remove them

this is because the user might want to debug level output but still want to have them running after stopping the test itself, so in order to avoid these situations, we will enable this feature via a new ENV var, keeping the default behavior as it was before and removing the resources with the timeout handler instead.

this will be only available in case we are debugging something and we don't want to waste resources

cc: @smuu @mojtaba-esk

tty47 avatar Apr 29 '24 09:04 tty47

good idea

mojtaba-esk avatar Apr 30 '24 09:04 mojtaba-esk

imo we shouldn't change the behavior of such a common pattern.

with almost every service, you expect to be able to stop things with crtl+c so knuu should be no different.

crtl+c shuts everything down.

What is being described here seems more like a testing variable of how the test cleanup is handled. Which is more of a pre-planned activity vs using crtl+c to stop things early. So this should be something that a developer could program into the test itself vs having to relay on debug mode flags and crtl+c.

MSevey avatar May 29 '24 14:05 MSevey

done

smuu avatar Jul 04 '24 14:07 smuu