Node SDK: add unit tests for the delete topic command

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

Maintainer thường phản hồi trong vòng 1 ngày

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
88/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
node.js, typescript
Lĩnh vực
backend, testing

Hướng nghiên cứu

Đọc foreign/node/src/wire/topic/create-topic.command.test.ts và phần triển khai DELETE_TOPIC.serialize. Thêm foreign/node/src/wire/topic/delete-topic.command.test.ts với các buffer kỳ vọng được tạo thủ công cho định danh dạng số và dạng chuỗi, cùng các giá trị partitionsCount là 0 và một giá trị lớn. Chạy npm run test:unit và npm run lint trong foreign/node; hoàn thành khi cả hai đều thành công.

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

Mô tả

good first issue javascript test
Description

DELETE_TOPIC.serialize in the Node SDK has no unit test. It writes the stream identifier, the topic identifier and a uint32 partitionsCount, with no range check. The sibling create-topic.command.test.ts and topic.utils.test.ts are tested.

Affected area / component

Node SDK

Proposed solution

Add foreign/node/src/wire/topic/delete-topic.command.test.ts, modelled on create-topic.command.test.ts.

  • The exact bytes for numeric and string stream and topic identifiers.
  • A partitionsCount of 0 and of a large value.
  • Build the expected buffers by hand, so the test does not call the code it checks.

Adding validation of partitionsCount is out of scope: it changes behaviour and needs a maintainer's view first.

How to test: npm run test:unit and npm run lint pass in foreign/node.

Good first issue
  • I think this could be a good first issue for a new contributor
Ngôn ngữ chính
Rust
Star
5.2k
Fork
516
Merge trung bình
2 ngày 12 giờ
Pull request đã merge (30 ngày)
145

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 apache/iggy

Tất cả issue của apache/iggy

Issue tương tự

Thêm issue về Rust

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.