Node SDK: add unit tests for the cluster node and metadata deserialisers
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 85/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- nodejs, typescript
- 領域
- testing
調査の方向性
foreign/node/src/wire/cluster/cluster.utils.ts の deserializeNode と deserializeMetadata、および cluster.type.ts のロールとステータスの値を読みます。delete-topic.command.test.ts のパターンに従い、単純な値からノードのバッファを作成するヘルパーを用意して、cluster.utils.test.ts を同じディレクトリに作成します。列挙したケースが npm run test:unit で通り、foreign/node で npm run lint が成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
deserializeNode and deserializeMetadata in foreign/node/src/wire/cluster/cluster.utils.ts have no unit test. deserializeNode reads a replica id, a length-prefixed name and IP, four uint16 ports, a role byte and a status byte, and throws when the buffer is too short at any step. deserializeMetadata reads a cluster name and a list of nodes. This is separate from #4968 and #4969, which add bounds checks to the client and consumer group deserialisers.
Affected area / component
Node SDK
Proposed solution
Add foreign/node/src/wire/cluster/cluster.utils.test.ts, modelled on foreign/node/src/wire/topic/delete-topic.command.test.ts. cluster.type.ts has the role and status values. A small helper in the test file that builds a node buffer from plain values lets each test change one field.
- Decode one hand-built node and check every field of the result, including
length. - Check the role and status names for each valid byte.
- Check that a buffer shorter than 19 bytes throws, and that a name length running past the end throws.
- Check that an unknown role byte throws
Invalid ClusterNodeRole. - Decode a metadata buffer with two nodes.
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
- 主要言語
- Rust
- スター
- 5.3k
- フォーク
- 548
- 平均マージ
- 2日 20時間
- マージ済み PR(30日)
- 194
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/iggy のほかの issue
-
go good first issue test
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 2 日以内に返信
-
go good first issue test
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 2 日以内に返信
-
go good first issue test
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 2 日以内に返信
-
good first issue java test
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 2 日以内に返信
-
good first issue javascript test
難易度 2/5 半日 初心者へのやさしさ 85/100
メンテナーはふだん 2 日以内に返信
似ている issue
-
bug triaged tui ux wontfix
難易度 2/5 半日 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
bevyengine/bevy#26642 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信