You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: prove the migration connect cap against a black-holed host #1122
nostream-cli migrate pg-to-lmdb bounds its first connection to the source with MIGRATION_CONNECT_CAP_MS (10 s) and one direct PgConnection::connect_with attempt. The bound is proven by inversion — removing the direct attempt makes the same test take 60.017 s and fail its clock assertion — but no test exercises a host that drops packets, which is the only case the cap exists for.
Against a refused port the driver answers immediately, so the test passes without the cap doing anything.
Acceptance
A test with:
DB_URI=postgres://192.0.2.1:5432/nostream (RFC 5737 TEST-NET-1: reserved for documentation, not routed, packets dropped)
DB_ACQUIRE_CONNECTION_TIMEOUT=60000, so the pool's value cannot be what bounds it
env_clear()
asserts exit 1 in under 25 s and stderr containing did not answer within the connect budget.
Why it is not in the migration branch
It is a duration test that depends on a host not answering. This job shipped three tests that passed for what the harness supplied (a local Postgres answering, a 60 s default, a root-run tempdir) and one that failed only as root; a network-dependent duration assertion is the same class with a narrower window, and ten seconds of suite time is not worth adding it to main one commit before the branch opens.
It belongs where a failure is informative — a nightly job, or a test marked #[ignore] with the reason in its name — rather than on the path every developer runs.
Activity
fix(migrate): refuse only the shape that breaks, and echo nothing
fix(migrate): refuse only the shape that breaks, and echo nothing
fix(migrate): refuse only the shape that breaks, and echo nothing