Allow to configure delay before controller exits (#8143)

* Allow to configure delay before controller exits

Signed-off-by: Aditya Kamath <theunrealgeek@gmail.com>

* Address comments

Signed-off-by: Aditya Kamath <theunrealgeek@gmail.com>
This commit is contained in:
Aditya Kamath 2022-01-17 15:24:49 -08:00 committed by GitHub
parent 4badf20173
commit 2aa34202c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 6 deletions

View file

@ -105,7 +105,7 @@ func TestHandleSigterm(t *testing.T) {
ngx := controller.NewNGINXController(conf, nil)
go handleSigterm(ngx, func(code int) {
go handleSigterm(ngx, 10, func(code int) {
if code != 1 {
t.Errorf("Expected exit code 1 but %d received", code)
}