From b13ebeaa1bac6404093095140ecb45419cb6e66e Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 31 Aug 2026 20:54:25 +0000 Subject: [PATCH] docs(e2e): correct three claims in the distributed e2e comments The closure note in cluster/failure.go quoted a Gomega error that Gomega does not emit. Describe the argument-count failure and the Eventually().WithArguments() hint instead, so nobody greps for a string that never appears. The advisory-lock note in cluster_failover_test.go called the wedge window unbounded. A SIGKILLed local child closes its socket at once, the Postgres backend reads EOF and is reaped in milliseconds, so the mechanism bounds the window tightly. Say bounded, and keep the low probability but real framing, which was right. The workflow comment attributed HealthCheckInterval to core/services/nodes/health.go. It is declared in core/config/distributed_config.go:64; health.go only carries the ticker on the unexported checkInterval. Point a debugger at the right file. Comments only, no behaviour change. Assisted-by: Claude Opus 5 [claude-code] Signed-off-by: Ettore Di Giacinto --- .github/workflows/tests-e2e-distributed.yml | 8 +++++--- tests/e2e/distributed/cluster/failure.go | 5 +++-- tests/e2e/distributed/cluster_failover_test.go | 5 +++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests-e2e-distributed.yml b/.github/workflows/tests-e2e-distributed.yml index d0cf24875..8f17e72f1 100644 --- a/.github/workflows/tests-e2e-distributed.yml +++ b/.github/workflows/tests-e2e-distributed.yml @@ -112,9 +112,11 @@ jobs: # 509.8s / 512.3s, so 8m29s to 8m32s) on a developer box, and will be slower # here. Three specs sit at ~167s each because they wait out a 60s staleness # threshold plus a 15s health-check tick (HealthCheckInterval, in - # core/services/nodes/health.go, not one of the reconcilers). Do not shorten those windows to make this job faster: the - # wait is what stops the assertions from passing before the system could - # have reacted, which was a real false green earlier on. + # core/config/distributed_config.go; core/services/nodes/health.go runs the + # ticker on the unexported checkInterval, not one of the reconcilers). Do + # not shorten those windows to make this job faster: the wait is what stops + # the assertions from passing before the system could have reacted, which + # was a real false green earlier on. timeout-minutes: 45 steps: - name: Clone diff --git a/tests/e2e/distributed/cluster/failure.go b/tests/e2e/distributed/cluster/failure.go index 9a461eed7..fe808401c 100644 --- a/tests/e2e/distributed/cluster/failure.go +++ b/tests/e2e/distributed/cluster/failure.go @@ -78,8 +78,9 @@ func (c *Cluster) KillWorker(i int) error { // Should(BeFalse()) // // FrontendAlive takes an index, so it has to be wrapped in a closure; handing -// Gomega the method value directly fails with "requested 1 arguments but -// received 0". Restart +// Gomega the method value directly fails immediately: Eventually reports that +// the function it was given takes one argument and none were provided, and +// points at Eventually().WithArguments(). Restart // terminates whatever is still running with SIGKILL, so restarting straight // after a SIGTERM cuts the drain short and quietly turns the rolling-update // case into the crash case, which is the opposite of what pairing those two diff --git a/tests/e2e/distributed/cluster_failover_test.go b/tests/e2e/distributed/cluster_failover_test.go index 2256a16ac..d007a8ae6 100644 --- a/tests/e2e/distributed/cluster_failover_test.go +++ b/tests/e2e/distributed/cluster_failover_test.go @@ -155,8 +155,9 @@ func (p *rosterProbe) explainStuckOffline(worker, format string, args ...any) fu // Consistently(healthy) passes BECAUSE NOTHING WAS CHECKING, and this helper // still succeeds afterwards once the session is reaped and the lock comes free. // That wedge is transient rather than permanent, which is exactly the shape the -// backwards inference cannot see. Low probability, real, and unbounded only by -// how fast Postgres notices a dead connection. +// backwards inference cannot see. Low probability, real, and bounded by how +// fast Postgres reaps the dead backend, usually immediate on a local socket +// close. // // So treat this as a floor and not a proof: it rules out a health monitor that // is permanently dead, which is the failure that would otherwise make the