test: two gaps in the connector's routed-transport check after #148

オープン 初心者向け
#151 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
django, python

調査の方向性

src/neolith/_connector.py の _takes_connect_by と tests/test_routing.py の test_each_entry_reads_with_its_own_receiver を読みます。デフォルト値の有無それぞれについて、キーワード専用の connect_by のテストを追加し、重複した n キーを返すインプロセスのレシーバーのテストも追加します。ルーティングされたシグネチャが受け入れられ、デフォルト値のないシグネチャが拒否され、インプロセスの結果が Answer(n=2) としてアサートされれば完了です。

索引モデルが issue の本文から書いたものです。

説明

help wanted

Two non-blocking findings from the review of #148, held back because the PR was approved:

  • _takes_connect_by (src/neolith/_connector.py) admits a call whose connect_by has no default, such as def call(self, action, request, context, *, connect_by). The connector leaves connect_by out when no share applies (the last entry, a non-idempotent action, no deadline), so such a call ends internal. Fix: require found.default is not inspect.Parameter.empty. Test a keyword-only connect_by=None, which is routed, and a keyword-only connect_by with no default, which is refused.
  • test_each_entry_reads_with_its_own_receiver (tests/test_routing.py) asserts only the remote half. Add a first entry with Receiver.IN_PROCESS that returns {"n":1,"n":2} and assert Answer(n=2).

Part of #13.

主要言語
Python
スター
1
フォーク
0
平均マージ
6時間 34分
マージ済み PR(30日)
108

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

stack314/django-neolith のほかの issue

stack314/django-neolith の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。