HarperFast / HarperFast/integration-testing
setupHarperWithFixture overwrites ctx.harper, dropping pre-set hostname (breaks multi-node add_node)
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 17d 7h
- Merged PRs (30d)
- 2
Description
## Summary
`setupHarperWithFixture` overwrites `ctx.harper` before calling `startHarper`, **discarding caller-set fields such as `hostname`**. In a multi-node test this makes the replication config's `securePort` reference a different address than the one Harper actually binds to, producing `ECONNREFUSED` on `add_node`.
## Context / repro
- Found while building a 2-node cluster cache test (HarperFast/harper-pro#415). Setting `ctx.harper.hostname` before `setupHarperWithFixture` had no effect because the function replaces `ctx.harper` wholesale.
- Workaround: call `startHarper` directly with a manually-prepared `dataRootDir` + `hostname` set on `ctx.harper`, bypassing `setupHarperWithFixture`.
## Expected
- `setupHarperWithFixture` should **merge into / preserve** caller-set fields on `ctx.harper` (especially `hostname`) rather than overwriting them, so the fixture helper is usable in multi-node / replication tests.
## References
- Workaround: HarperFast/harper-pro#415 (`integrationTests/cluster/cacheReplicationSource.test.mjs`)
Filed by Claude (Opus 4.8) on behalf of Kris while implementing the release-testing coverage gaps.
Contributor guide
Assessment
This issue has not been assessed yet.