-
Notifications
You must be signed in to change notification settings - Fork 280
Prevent having to manually kill main.go after running dredd #1889
Comments
Your code have to support signals to be killed by dredd as normal application. Here is how to do it - https://stackoverflow.com/questions/18106749/golang-catch-signals Related part in docs |
hey, still not able to get it to work after implementing the signals catch solution. Here's my code
and my dredd.yml
From what I can see dredd does not seem to trigger SIGTERM after the test have finished. If I trigger SIGTERM another way the code above works. Any ideas? |
@hex6b I suspect that the SIGTERM is lost somewhere when doing |
The commit refers to golang/go#23716 that explains that this behaviour is not a bug actually. To fully understand the issue I’ve dived into golang repo.
Cite from https://medium.com/@ns3777k/go-run-and-exit-codes-7ad1175821c1 |
Is your feature request related to a problem? Please describe.
I keep having to kill the previous go server in system monitor (linux) before re-running dredd test.
Describe the solution you'd like
Auto kill the go server after tests have completed
Describe alternatives you've considered
Manually killing main.go from system monitor
Additional context
Sorry for making an issue, but I can't find the answer in the docs.
My project code is here https://github.com/hex6b/go-heroku
The text was updated successfully, but these errors were encountered: