From 81ab9dc2b84d1516441ec253afe53ab1a2d0a6e0 Mon Sep 17 00:00:00 2001 From: Easwar Swaminathan Date: Wed, 9 Oct 2024 18:15:19 +0000 Subject: [PATCH] testutils: add couple of log statements to the restartable listener type --- internal/testutils/restartable_listener.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/testutils/restartable_listener.go b/internal/testutils/restartable_listener.go index efe4019a08c2..1849b9cfb24e 100644 --- a/internal/testutils/restartable_listener.go +++ b/internal/testutils/restartable_listener.go @@ -81,6 +81,8 @@ func (l *RestartableListener) Addr() net.Addr { // Stop closes existing connections on the listener and prevents new connections // from being accepted. func (l *RestartableListener) Stop() { + logger.Infof("Stopping restartable listener %q", l.Addr()) + l.mu.Lock() l.stopped = true for _, conn := range l.conns { @@ -92,6 +94,8 @@ func (l *RestartableListener) Stop() { // Restart gets a previously stopped listener to start accepting connections. func (l *RestartableListener) Restart() { + logger.Infof("Restarting listener %q", l.Addr()) + l.mu.Lock() l.stopped = false l.mu.Unlock()