8000 test: third_party/ldapserver suite is unrunnable standalone; midsearch stall is host-tolerant not deterministic · Issue #36 · Altinity/altinity-oauth-helper · GitHub
[go: up one dir, main page]

Skip to content

test: third_party/ldapserver suite is unrunnable standalone; midsearch stall is host-tolerant not deterministic #36

Closed

Description

@BorisTyshkevich

Out of scope for #23, found while making go test -race ./... pass on hosted Linux for the
first time. Two independent items in the LDAP test surface.

1. third_party/ldapserver's own test suite cannot run standalone

$ (cd third_party/ldapserver && go test ./...)
# github.com/vjeantet/ldapserver
cancel.go:7:2: missing go.sum entry for module providing package
github.com/vjeantet/goldap/message (imported by github.com/vjeantet/ldapserver)
FAIL	github.com/vjeantet/ldapserver [setup failed]

Pre-existing, not caused by #23 — the entry is absent on origin/main too, and #23's only
third_party/ edit was a Markdown file. third_party/ldapserver is a separate module whose
own go.sum lacks the goldap entry it needs when built outside the root module's
replace.

Consequence: cancel_test.go, client_close_test.go, client_test.go, e2e_test.go,
packet_test.go and server_test.go exist but are unrunnable by any means. The root
go test ./... does not traverse separate modules, CLAUDE.md's "Build & test" section
documents running third_party/goldap's suite explicitly but not this one, and
.github/workflows/pr-gate.yml does not either.

Fix is probably a go mod tidy inside that module, or a replace in its own go.mod
pointing at ../goldap. Whichever way, CLAUDE.md should then name the command the way it
already does for third_party/goldap.

This matters for #33: that issue replaces the parser living in these forks, and today a test
placed there is gated by nothing at all.

2. midsearch_test.go's two tests reach their stall over real TCP, so they tolerate

rather than create the condition on a large-buffer host

TestAdversarial_WriteDeadlineClosesStalledConnectionAndUnblocksGracefulShutdown was
converted in #23 to drive its stall over an unbuffered net.Pipe, because the previous
real-socket approach was host-dependent: a 20 MiB response that blocks immediately on macOS
(net.inet.tcp.sendspace = 128 KiB) was delivered in full by a hosted Linux runner, which
buffered the whole thing — so the WriteTimeout mechanism under test never engaged and the
assertion failed for the wrong reason.

midsearch_test.go still uses the old shape: 5 × 5 MiB roles over a real socket. Its
assertions do not depend on the stall actually happening (verified — they assert
goroutine unwind, no leaks, and bounded shutdown, all of which hold either way), so it
passes on both platforms and is not currently a CI risk. But it is tolerant of the
condition rather than deterministic about it, which means on a large-buffer host it
quietly proves less than it appears to.

Converting it to the same one-connection net.Pipe listener substrate
(singleConnListener in internal/ldap/adversarial_test.go) would make it deterministic on
every host. The header comment there already records this finding and why those two tests
may keep real TCP for now.

Activity

  1. BorisTyshkevich commented on Aug 31, 2026

    @BorisTyshkevich
    CollaboratorAuthor

    Resolved by issue #33 Phase 4 (merged as PR #41): the obsolete third_party/ldapserver module was removed, eliminating its standalone-suite failure, and the replacement internal/ldap/profile suite includes deterministic net.Pipe-based write-stall coverage. Closing as superseded by the completed cutover.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0