Add option for truncated stream detection (#75671)
authormfkl <me@martinfinkel.com>
Wed, 2 Nov 2022 04:13:38 +0000 (11:13 +0700)
committerGitHub <noreply@github.com>
Wed, 2 Nov 2022 04:13:38 +0000 (23:13 -0500)
commitf43d5e3abe9653fed79ec9572ee7e905639a97b5
treed6f937e342c62f99efe1ccf17c134035d96246e6
parentd3a3eda6f4660e85f7a603b624b43993529be377
Add option for truncated stream detection (#75671)

* Add option for truncated stream detection

fix https://github.com/dotnet/runtime/issues/47563

* Use RemoteExecutor

move the test to concrete classes as abstracted classes are not supported by RemoteExecutor

* review feedback

* use same error text message

* cache appcontext getswitch

* fix failing test

* slice byte array for assertion

* renaming

* add missing RemoteExecutor.IsSupported

* fast check first
12 files changed:
src/libraries/Common/tests/System/IO/Compression/CompressionStreamUnitTestBase.cs
src/libraries/Common/tests/System/IO/Compression/ZipTestHelper.cs
src/libraries/System.IO.Compression.Brotli/src/Resources/Strings.resx
src/libraries/System.IO.Compression.Brotli/src/System/IO/Compression/dec/BrotliStream.Decompress.cs
src/libraries/System.IO.Compression.ZipFile/tests/ZipFile.Create.cs
src/libraries/System.IO.Compression/src/Resources/Strings.resx
src/libraries/System.IO.Compression/src/System/IO/Compression/DeflateZLib/DeflateStream.cs
src/libraries/System.IO.Compression/src/System/IO/Compression/DeflateZLib/Inflater.cs
src/libraries/System.IO.Compression/tests/CompressionStreamUnitTests.Deflate.cs
src/libraries/System.IO.Compression/tests/CompressionStreamUnitTests.Gzip.cs
src/libraries/System.IO.Compression/tests/CompressionStreamUnitTests.ZLib.cs
src/libraries/System.IO.Compression/tests/System.IO.Compression.Tests.csproj