Skip to content

Update test expectation due to #872 - #74

Closed
adsharma wants to merge 2 commits into
mainfrom
fix_test_expectation
Closed

Update test expectation due to #872#74
adsharma wants to merge 2 commits into
mainfrom
fix_test_expectation

Conversation

@adsharma

@adsharma adsharma commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Related to: LadybugDB/ladybug#872

RepeatOpenDoesNotIssueSecondHead failed flakily in the ladybug repo CI
(headCount()==0) under `ctest -j10`.

The vendored httplib enables SO_REUSEPORT by default on Linux, which
lets multiple sockets bind the same port and load-balances connections
between them. ctest runs each gtest case in its own process, so two
concurrent test processes both successfully bound 127.0.0.1:18123 and
the kernel routed some requests to the other process's server - the
HEAD-count assertion then observed requests that never reached the
server it was checking (reproduced locally: two concurrent processes
both bound 18123, and the failing process saw headCount 0 or 2).

Override the server socket options to set only SO_REUSEADDR so a second
bind of the same port fails with EADDRINUSE and the existing port scan
falls through to a genuinely free port. 20 consecutive `ctest -j10`
runs pass with this change; without it ~25% of runs failed.
@adsharma adsharma closed this Sep 1, 2026
@adsharma
adsharma deleted the fix_test_expectation branch September 1, 2026 16:49
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.

1 participant