Skip to content

Conversation

@ibujna
Copy link

@ibujna ibujna commented Jan 16, 2026

The reload timeout in clock_handler() is set to 1 second. Add a sleep to reliably trigger the event timeout during tests.

The reload timeout in clock_handler() is set to 1 second.
Add a sleep to reliably trigger the event timeout during tests.
@ibujna ibujna changed the base branch from master to next January 16, 2026 09:24
@dormando
Copy link
Member

I'm not clear on this one either. The watcher should be waiting for the log lines to come in. What is this fixing, exactly?

@ibujna
Copy link
Author

ibujna commented Jan 27, 2026

The libevent call for the proxy reload functionality is configured in the clock_handler()

struct timeval t = {.tv_sec = 1, .tv_usec = 0};
function with a 1-second interval.
On some systems (tested for example on macOS Tahoe), there is a situation where the reload waits for this 1-second libevent event, but in the meantime the test receives the log entry
"ts=12212211 gid=1000 type=proxy_conf status=start" from the socket.
At minimum, a 1-second sleep should be added here. Same as setup in clock_handler().
This happens randomly about for example once every ten runs.

@dormando
Copy link
Member

dormando commented Jan 27, 2026

@ibujna what's the actual test output when it fails?

I'm fairly sure I designed this test so that it just blocks until the 1 second timer clicks over, so I'm curious what log line you're getting that causes it to fail.

IIRC there's at least one other test where it'll wait for a while looking for a specific log line (edit: while ignoring anything else), and this test probably just needs that code.

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