openship
openship copied to clipboard
test: make TCP timeout test deterministic
Summary
The TCP timeout test connects to 192.0.2.1:22.
This address can be reachable on private networks.
The test can fail based on network routing.
Proposed change
Simulate the socket timeout in the test.
Keep the assertion that probeTcp returns false.
Validation
bun run --cwd packages/adapters test -- src/system/reachability.test.tsbun run --cwd packages/adapters lint