Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#19 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
typescript
Lĩnh vực
testing

Hướng nghiên cứu

Tìm setupHarperWithFixture và kiểm tra cách nó khởi tạo ctx.harper trước startHarper. Sử dụng integrationTests/cluster/cacheReplicationSource.test.mjs và kịch bản add_node nhiều nút của nó làm tài liệu tham chiếu. Hoàn thành khi các trường do caller cung cấp, chẳng hạn như hostname, vẫn được giữ lại sau khi thiết lập fixture và kịch bản replication không còn nhận ECONNREFUSED.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
1
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của HarperFast/integration-testing

Tất cả issue của HarperFast/integration-testing

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.