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 @@ -2674,8 +2674,12 @@ def test_compress_locking(self):
2674
2674
input = b'a' * (16 * _1K )
2675
2675
num_threads = 8
2676
2676
2677
+ # gh-136394: the first output of .compress() includes the frame header
2678
+ # we run the first .compress() call outside of the threaded portion
2679
+ # to make the test order-independent
2680
+
2677
2681
comp = ZstdCompressor ()
2678
- parts = []
2682
+ parts = [comp . compress ( input , ZstdCompressor . FLUSH_BLOCK ) ]
2679
2683
for _ in range (num_threads ):
2680
2684
res = comp .compress (input , ZstdCompressor .FLUSH_BLOCK )
2681
2685
if res :
@@ -2684,7 +2688,7 @@ def test_compress_locking(self):
2684
2688
expected = b'' .join (parts ) + rest1
2685
2689
2686
2690
comp = ZstdCompressor ()
2687
- output = []
2691
+ output = [comp . compress ( input , ZstdCompressor . FLUSH_BLOCK ) ]
2688
2692
def run_method (method , input_data , output_data ):
2689
2693
res = method (input_data , ZstdCompressor .FLUSH_BLOCK )
2690
2694
if res :
You can’t perform that action at this time.
0 commit comments