File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2673,8 +2673,12 @@ def test_compress_locking(self):
26732673 input = b'a' * (16 * _1K )
26742674 num_threads = 8
26752675
2676+ # gh-136394: the first output of .compress() includes the frame header
2677+ # we run the first .compress() call outside of the threaded portion
2678+ # to make the test order-independent
2679+
26762680 comp = ZstdCompressor ()
2677- parts = []
2681+ parts = [comp . compress ( input , ZstdCompressor . FLUSH_BLOCK ) ]
26782682 for _ in range (num_threads ):
26792683 res = comp .compress (input , ZstdCompressor .FLUSH_BLOCK )
26802684 if res :
@@ -2683,7 +2687,7 @@ def test_compress_locking(self):
26832687 expected = b'' .join (parts ) + rest1
26842688
26852689 comp = ZstdCompressor ()
2686- output = []
2690+ output = [comp . compress ( input , ZstdCompressor . FLUSH_BLOCK ) ]
26872691 def run_method (method , input_data , output_data ):
26882692 res = method (input_data , ZstdCompressor .FLUSH_BLOCK )
26892693 if res :
You can’t perform that action at this time.
0 commit comments