mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: make it harder to skip graceful shutdown accidentally (#1327)
* feat: make it harder to skip graceful shutdown accidentally Signed-off-by: Spike Curtis <spike@coder.com> * fixup: don't use unbuffered signal channel Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
@@ -271,6 +271,12 @@ func TestServer(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
err = currentProcess.Signal(os.Interrupt)
|
||||
require.NoError(t, err)
|
||||
// Send a two more signal, which should be ignored. Send 2 because the channel has a buffer
|
||||
// of 1 and we want to make sure that nothing strange happens if we exceed the buffer.
|
||||
err = currentProcess.Signal(os.Interrupt)
|
||||
require.NoError(t, err)
|
||||
err = currentProcess.Signal(os.Interrupt)
|
||||
require.NoError(t, err)
|
||||
<-done
|
||||
})
|
||||
t.Run("DatadogTracerNoLeak", func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user