Redesign tests based on `QueueTestHead` and `onFinalizeWeak`
まだ誰も着手していません。
評価
調査の方向性
QueueTestHead と request.body.onFinalizeWeak を組み合わせている Http1ClientStageSuite と ClientTimeoutSuite のテストから始めてください。org.http4s.blazecore.util.EntityBodyWriter#writeEntityBody、特に drain と writeEnd の順序を確認してください。テストが body-stream の finalization に依存せずにリクエストが送信されたことを検出し、報告されている flaky な挙動が発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Http1ClientStageSuite and ClientTimeoutSuite."Idle timeout on slow POST body" use a combo of QueueTestHead to mock the network side of the connection and request.body.onFinalizeWeak to trigger some action in QueueTestHead. In these tests onFinalizeWeak is meant to detect when the request has been sent. The problem is that finalisation of the request body stream, does not guarantee the request has been sent. This can be clearly seen in the code of org.http4s.blazecore.util.EntityBodyWriter#writeEntityBody where writeEnd is executed after drain:
def writeEntityBody(p: EntityBody[F]): F[Boolean] = {
val writeBody: F[Unit] = p.through(writePipe).compile.drain
val writeBodyEnd: F[Boolean] = fromFutureNoShift(F.delay(writeEnd(Chunk.empty)))
writeBody *> writeBodyEnd
}
This issue leads to flaky tests like this one:
https://github.com/http4s/http4s/runs/4498891671?check_suite_focus=true#step:13:5129
- 主要言語
- Scala
- スター
- 371
- フォーク
- 63
- 平均マージ
- 7時間 47分
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
http4s/blaze のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
-
support
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
似ている issue
-
Traffic event delivered/rejected counters appear swapped in TrafficStateController.updateWithReceiptオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
digital-asset/canton#705 ·
メンテナーはふだん 2 日以内に返信
-
easy first-contributor first-contributors good first issue help wanted scala up-for-grabs
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
fork-commit-merge/fork-commit-merge#8457 ·
メンテナーはふだん 1 日以内に返信
-
[GC] Empty or non-numeric GC_*_HEAP_SIZE reads out of bounds or uses an uninitialised size対応中かも @oluies が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
scala-native/scala-native#5177 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
promovolve/promovolve#358 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
svroonland/zio-kinesis#1431 ·