diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-11-06 20:19:42 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-11-06 20:33:14 +0900 |
| commit | 3a92f0609b69b2ed90b8b38421e9e919db3e3c67 (patch) | |
| tree | 3f34381e45c682f6ad1a20d66c6ea2d2a64c52e3 /internal | |
| parent | 16c88f6deb5aecc39d74f777905ca2a4abba8b2e (diff) | |
internal/testsuite: notify on long polls
This prints a message every second for a long-running poll.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/testsuite/testsuite.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/testsuite/testsuite.go b/internal/testsuite/testsuite.go index a1e3b34b..6278d066 100644 --- a/internal/testsuite/testsuite.go +++ b/internal/testsuite/testsuite.go @@ -283,6 +283,14 @@ func Poll( extraEnv []string, command ...string, ) { + n := time.NewTicker(1 * time.Second) + defer n.Stop() + go func() { + for range n.C { + log.Printf("still polling %s", strings.Join(command, " ")) + } + }() + for range time.NewTicker(d).C { cmd := exec.Command(command[0], command[1:]...) cmd.SysProcAttr = &syscall.SysProcAttr{ |
