HarperFast / HarperFast/harper
Integration test harness: startup-deadline and teardown/loopback-recycle races (tracks integration-testing#8)
- Dominant language
- JavaScript
- Stars
- 89
- Forks
- 10
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 200
Description
## Summary
Tracking issue for two integration-test-harness races that contribute to Integration Tests flakiness. The fix lives in the harness package (`@harperfast/integration-testing`), so the detailed report is filed there: **HarperFast/integration-testing#8**. This issue keeps it visible where the CI pain shows up.
## The two races (see HarperFast/integration-testing#8 for detail)
1. **Fixed startup deadline.** `startHarper()` rejects if Harper doesn't print `successfully started` within `DEFAULT_STARTUP_TIMEOUT_MS` (default 60s). Under shard contention, healthy boots exceed 60s, so this repo already works around it in `.github/workflows/integration-tests.yml`:
- `HARPER_INTEGRATION_TEST_STARTUP_TIMEOUT_MS=120000` (Linux), `180000` (Windows), with comments explaining slow/contended runners and Windows being slower.
These workarounds are holding for now, but the underlying deadline-as-readiness design is the flake lever.
2. **Teardown SIGKILL window + immediate loopback recycle.** `killHarper()` escalates to SIGKILL after 200ms (RocksDB may still be flushing), and `teardownHarper()` immediately releases the loopback IP. Because ports are fixed and only the loopback address rotates, the next suite to grab that IP can hit `EADDRINUSE` / `ECONNREFUSED` against sockets still closing or held by orphaned worker children. This is the "connection refused on restart" class of flake.
## Why a downstream tracker
The env workarounds (item 1) live in this repo and should be revisited / removed once the harness offers readiness polling. Item 2 is a contributor to the restart-symptom seen in #1136 (replay-stress) but is harness-level, not Harper-level.
## Action
- Upstream fix: HarperFast/integration-testing#8.
- Once addressed, revisit the `HARPER_INTEGRATION_TEST_STARTUP_TIMEOUT_MS` overrides in `integration-tests.yml`.
## Related
- HarperFast/integration-testing#8 — upstream detail + fix
- #1136 — replay-stress flake (the harness race amplifies its ECONNREFUSED symptom)
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Contributor guide
Assessment
This issue has not been assessed yet.