@@ -299,38 +299,25 @@ def test_sync_with_single_process_single_worker_works(self, mock_fg_class):
299299 # Should not raise validation error
300300 manager .run (data_frame = df , wait = True )
301301
302- def test_async_with_multiple_workers_no_validation_error (self ):
303- """Test that wait=False with max_workers > 1 doesn't raise validation error."""
302+ @pytest .mark .parametrize ("max_workers,max_processes" , [
303+ (2 , 1 ), # Multiple workers, single process
304+ (1 , 2 ), # Single worker, multiple processes
305+ (2 , 2 ), # Multiple workers and processes
306+ ])
307+ @patch .object (IngestionManagerPandas , '_run_multi_process' )
308+ def test_async_with_parallelism_no_validation_error (self , mock_run , max_workers , max_processes ):
309+ """Test that wait=False works with any parallelism configuration where max_workers > 1 OR max_processes > 1."""
304310 manager = IngestionManagerPandas (
305311 feature_group_name = "test-fg" ,
306312 feature_definitions = {"id" : {"FeatureType" : "String" , "CollectionType" : None }},
307- max_workers = 2 ,
308- max_processes = 1 ,
309- )
310-
311- df = pd .DataFrame ({"id" : ["1" , "2" , "3" ]})
312-
313- # Should not raise validation error (will fail on actual ingestion, but that's expected)
314- with pytest .raises (Exception ) as exc_info :
315- manager .run (data_frame = df , wait = False )
316-
317- # Make sure it's not the validation error
318- assert "Async ingestion (wait=False)" not in str (exc_info .value )
319-
320- def test_async_with_multiple_processes_no_validation_error (self ):
321- """Test that wait=False with max_processes > 1 doesn't raise validation error."""
322- manager = IngestionManagerPandas (
323- feature_group_name = "test-fg" ,
324- feature_definitions = {"id" : {"FeatureType" : "String" , "CollectionType" : None }},
325- max_workers = 1 ,
326- max_processes = 2 ,
313+ max_workers = max_workers ,
314+ max_processes = max_processes ,
327315 )
328316
329317 df = pd .DataFrame ({"id" : ["1" , "2" , "3" ]})
330318
331- # Should not raise validation error (will fail on actual ingestion, but that's expected)
332- with pytest .raises (Exception ) as exc_info :
333- manager .run (data_frame = df , wait = False )
319+ # Should not raise validation error
320+ manager .run (data_frame = df , wait = False )
334321
335- # Make sure it's not the validation error
336- assert "Async ingestion (wait=False)" not in str ( exc_info . value )
322+ # Verify it called the multi-process method (positive assertion)
323+ mock_run . assert_called_once ( )
0 commit comments