Skip to content

Deduplicate sample_ev test helper in forward.rs (DSK-133)#174

Merged
daisuke8000 merged 1 commit into
mainfrom
fix/dsk-133-sample-ev
Jul 5, 2026
Merged

Deduplicate sample_ev test helper in forward.rs (DSK-133)#174
daisuke8000 merged 1 commit into
mainfrom
fix/dsk-133-sample-ev

Conversation

@daisuke8000

@daisuke8000 daisuke8000 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Move duplicated sample_ev() helpers in forward tests to a single module-level function.

Test plan

  • cargo test -p rustern-core --lib runtime::forward
  • Local CodeRabbit review (0 findings)

Made with Cursor

Summary by CodeRabbit

  • テスト
    • いくつかの関連テストで共通の入力データ生成を使うよう整理しました。
    • 重複していた記述を削減し、テスト内容の見通しと保守性を向上させました。

Extract one module-level sample_ev() shared by four forward tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9b5de92f-1a21-4a49-be28-a13696051b26

📥 Commits

Reviewing files that changed from the base of the PR and between 46436c1 and 4993cbb.

📒 Files selected for processing (1)
  • crates/rustern-core/src/runtime/forward.rs

📝 Walkthrough

Walkthrough

crates/rustern-core/src/runtime/forward.rs のテストモジュールにおいて、複数のテスト関数でローカルに重複定義されていた sample_ev() ヘルパー関数を共通の1箇所の定義に統合した。lossy モードの try_send 関連テスト、RunStats カウント検証テスト、source API エラー計測検証テストから重複するローカル定義を削除し、共通ヘルパーを参照するように変更した。forward_to_render のテストロジック自体(入力生成、チャネルサイズ、アサーション)に変更はない。公開APIの変更なし。

変更点

  • テストコードの重複排除のみ。重大度: 低(テスト専用の内部リファクタリングで、非同期処理・K8s・セキュリティへの影響なし)

Possibly related issues

  • DSK-133: forward.rs 内の重複した sample_ev() テストヘルパーを共通の mod tests 定義へ統合するという目的が本PRの変更内容と一致する。
🚥 Pre-merge checks | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning 変更内容には合っていますが、必須の Conventional Commits プレフィックスがなく、要求形式を満たしていません。 test: deduplicate sample_ev test helper in forward.rs (DSK-133) のように Conventional Commits 形式へ直してください。
Description check ⚠️ Warning 要約とテスト計画はありますが、テンプレート必須の ## 概要## 変更理由 が未使用です。 ## 概要## 変更理由 を追加し、変更の背景と目的を短く埋めてください。

Comment @coderabbitai help to get the list of available commands.

@daisuke8000
daisuke8000 merged commit bf50007 into main Jul 5, 2026
3 checks passed
@daisuke8000
daisuke8000 deleted the fix/dsk-133-sample-ev branch July 5, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant