Publish ITWorx Pulse source
Public source validation / validate (push) Failing after 3m8s

This commit is contained in:
ITWorx Pulse release export committed 2026-09-03 02:09:19 +02:00
commit bd774932d5
614 files changed
+77116

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
package service
import (
"context"
"os"
"testing"
"time"
)
func TestWaitForStopReturnsOnSignal(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
signals := make(chan os.Signal, 1)
done := make(chan struct{})
go func() {
WaitForStop(ctx, signals)
close(done)
}()
signals <- os.Interrupt
select {
case <-done:
case <-time.After(time.Second):
t.Fatal("shutdown did not return after signal")
}
}