From f7744a872f89e407f47e7d173daafe0f695b3eab Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Thu, 27 Aug 2026 12:42:51 +0200 Subject: [PATCH] test(e2e): TestAttachRestart failure dumps the daemon's own log view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The FinishedAt anchor did not cure the third-run loss on CI (still 2 worlds for 3 exit notices after a full minute, oldstable runner). The remaining suspects are on both sides of the API: a line the daemon never captured (copier torn down before a millisecond-lived run's output) or a line compose still fails to relay. On timeout the test now dumps `docker logs` for the container — ground truth that discriminates the two on the next CI occurrence. Signed-off-by: Nicolas De Loof --- pkg/e2e/compose_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/e2e/compose_test.go b/pkg/e2e/compose_test.go index 20fee1cc1..a33198de7 100644 --- a/pkg/e2e/compose_test.go +++ b/pkg/e2e/compose_test.go @@ -163,10 +163,13 @@ func TestAttachRestart(t *testing.T) { // orders one relative to the other, so the last restart's log line can // still be in flight the instant the 3rd "exited" is observed above — // wait for it instead of counting it immediately. + // On failure, dump the daemon's own view of the container log: it + // discriminates a line compose failed to relay (present below, absent + // above) from a line the daemon itself never captured. c.WaitForCondition(t, func() (bool, string) { - debug := res.Combined() + daemonView := icmd.RunCmd(c.NewDockerCmd(t, "logs", "attach-restart-failing-1")).Combined() return strings.Count(res.Stdout(), "failing-1 | world") == 3, - fmt.Sprintf("'failing-1 | world' not found 3 times in : \n%s\n", debug) + fmt.Sprintf("'failing-1 | world' not found 3 times in : \n%s\ndaemon log view:\n%s\n", res.Combined(), daemonView) }, 30*time.Second, 1*time.Second) }