HarperFast / HarperFast/integration-testing

setupHarperWithFixture overwrites ctx.harper, dropping pre-set hostname (breaks multi-node add_node)

Open
#19 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.