openship icon indicating copy to clipboard operation
openship copied to clipboard

test: make TCP timeout test deterministic

Open luojiyin1987 opened this issue 4 months ago • 0 comments

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.ts
  • bun run --cwd packages/adapters lint

luojiyin1987 avatar Jul 20 '26 07:07 luojiyin1987