ZipBytes length test fails on macOS with .NET 10.0.400

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

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

@mkzung がすでに取り組んでいます。

2026年11月6日 から。

  • #10041 @mkzung による — オープン

評価

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

調査の方向性

テストプロジェクトで ZipBytesReturnsByteArrayWithCorrectLength から始め、Compression.ZipBytes の出力をどのように検証しているかを確認します。ZIP 終端レコードが最後の 22 バイトであることを検証するようテストを更新し、その後アーカイブを展開してバイナリペイロード全体を比較します。提示されたフィルター付き dotnet test コマンドを実行します。圧縮後のサイズを固定値に頼らず、テストが成功すれば完了です。

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

説明

Expected Behavior

ZipBytesReturnsByteArrayWithCorrectLength checks that Compression.ZipBytes returns exactly the archive bytes, without unused buffer capacity. A valid archive should pass across supported runtimes.

Actual Behavior

On macOS arm64 with .NET SDK 10.0.400, unchanged master 06eb5cb315c7265e00fd2c3c0eda1caef697e637 produces 905,693 bytes, while the test expects 906,121 for every non-Windows platform. The archive decompresses to the original fixture without any extra bytes.

Reproducing the Problem
dotnet test Tests/QuantConnect.Tests.csproj --configuration Release --filter FullyQualifiedName~ZipBytesReturnsByteArrayWithCorrectLength

Expected: 906121. Actual: 905693.

Potential Solution

Check that the no-comment ZIP end record occupies the final 22 bytes, then decompress and compare the complete binary payload. This catches returning MemoryStream.GetBuffer() in place of ToArray() without depending on a particular Deflate output size.

主要言語
C#
スター
22.4k
フォーク
5.4k
平均マージ
1日 23時間
マージ済み PR(30日)
51

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

QuantConnect/Lean のほかの issue

QuantConnect/Lean の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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