Complete queue diagnostics and validate current-main Go parity

This commit is contained in:
Thomas Durieux committed 2026-11-14 17:05:25 +00:00
1 parent 116cbbaf66
commit e85f7df752
16 files changed
+505 -20

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ func serveAndDrain(ctx context.Context, server *http.Server, jobs func(context.C
if err != nil {
return true, errListen
}
slog.Info("Go backend listening", "address", listener.Addr().String())
slog.Info("server started", "module", "process", "listenPort", listener.Addr().(*net.TCPAddr).Port)
workers, cancelWorkers := context.WithCancel(ctx)
defer cancelWorkers()
jobsDone := make(chan struct{})
@@ -4,10 +4,12 @@ import (
"bufio"
"context"
"encoding/base64"
"encoding/json"
"net"
"net/http"
"os"
"os/exec"
"strconv"
"strings"
"syscall"
"testing"
@@ -54,10 +56,13 @@ func TestExecutableSignalsIntegration(t *testing.T) {
go func() {
scanner := bufio.NewScanner(stderr)
for scanner.Scan() {
_, suffix, ok := strings.Cut(scanner.Text(), "address=")
if ok {
var entry struct {
Event string `json:"event"`
Port int `json:"listenPort"`
}
if json.Unmarshal(scanner.Bytes(), &entry) == nil && entry.Event == "server_started" && entry.Port > 0 && entry.Port <= 65535 {
select {
case ready <- strings.Trim(suffix, "\""):
case ready <- net.JoinHostPort("127.0.0.1", strconv.Itoa(entry.Port)):
default:
}
}