Skip to content

Conversation

@amartinezfayo
Copy link
Member

I noticed in a recent run (https://github.com/spiffe/spire/actions/runs/20684724898/job/59383543125?pr=6532#step:5:417) that TestTLSConfig/update_key_file_with_an_invalid_key_start_error_log_loop failed again.

PR #6528 removed Eventually assuming the goroutine would complete synchronously after clk.Add(), but the goroutine needs to be scheduled by the Go runtime to process the ticker events and write log entries, causing the test to fail when assertions ran before the goroutine finished its work.
This PR adds back Eventually only where needed to wait for asynchronous goroutine execution.

…or_log_loop in diskcertmanager package.

The previous fix in spiffe#6528 removed Eventually assuming synchronous execution with the mock clock, but the goroutine processing ticker events needs real wall-clock time to write log entries after clk.Add() returns, causing intermittent failures when assertions ran before logs appeared.

Signed-off-by: Agustín Martínez Fayó <amartinezfayo@gmail.com>
Copy link
Collaborator

@sorindumitru sorindumitru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@amartinezfayo amartinezfayo merged commit c04de61 into spiffe:main Jan 5, 2026
49 checks passed
@amartinezfayo amartinezfayo added this to the 1.14.1 milestone Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants