File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2675,15 +2675,17 @@ def test_compress_locking(self):
26752675
26762676        comp  =  ZstdCompressor ()
26772677        parts  =  []
2678-         for  _  in  range (num_threads ):
2678+         for  _  in  range (num_threads   +   1 ):
26792679            res  =  comp .compress (input , ZstdCompressor .FLUSH_BLOCK )
26802680            if  res :
26812681                parts .append (res )
26822682        rest1  =  comp .flush ()
26832683        expected  =  b'' .join (parts ) +  rest1 
26842684
26852685        comp  =  ZstdCompressor ()
2686-         output  =  []
2686+         # Compress the first block to add the Zstandard header. This ensures 
2687+         # that the parallel portion of the test is thread order independent. 
2688+         output  =  [comp .compress (input , ZstdCompressor .FLUSH_BLOCK )]
26872689        def  run_method (method , input_data , output_data ):
26882690            res  =  method (input_data , ZstdCompressor .FLUSH_BLOCK )
26892691            if  res :
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments