Skip to content

Commit b6ef66a

Browse files
committed
Added debug to apparent stop channel called early.
1 parent c1a1e09 commit b6ef66a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

cmd/agent/app/server.go

+2
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,11 @@ func SetupSignalHandler() (drainCh, stopCh <-chan struct{}) {
121121

122122
func handleSignals(signalCh chan os.Signal, drainCh, stopCh chan struct{}) {
123123
s := <-signalCh
124+
fmt.Println("Received first os signal")
124125
klog.V(2).InfoS("Received first signal", "signal", s)
125126
close(drainCh)
126127
s = <-signalCh
128+
fmt.Println("Received second os signal")
127129
klog.V(2).InfoS("Received second signal", "signal", s)
128130
close(stopCh)
129131
}

tests/framework/proxy_server.go

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ func (*InProcessProxyServerRunner) Start(t testing.TB, opts ProxyServerOpts) (Pr
7676
if err := wait.PollImmediateWithContext(ctx, 100*time.Millisecond, wait.ForeverTestTimeout, func(context.Context) (bool, error) {
7777
return checkLiveness(healthAddr), nil
7878
}); err != nil {
79+
fmt.Println("Calling stop channel because server never came up")
7980
close(stopCh)
8081
return nil, fmt.Errorf("server never came up: %v", err)
8182
}

0 commit comments

Comments
 (0)