@@ -436,13 +436,12 @@ protected override void PrepareCreateTableWithPrimaryKeys(out string sqlUpdate,
436436
437437 // NOTE: this is a thirty minute test. As of writing, databricks commands have 20 minutes of idle time (and checked every 5 mintues)
438438 [ SkippableTheory ]
439- [ InlineData ( true , "CloudFetch enabled" ) ]
440- [ InlineData ( false , "CloudFetch disabled" ) ]
439+ [ InlineData ( true , "CloudFetch enabled" ) ] // TODO: test cloudfetch disabled
441440 public async Task StatusPollerKeepsQueryAlive ( bool useCloudFetch , string configName )
442441 {
443442 OutputHelper ? . WriteLine ( $ "Testing status poller with long delay between reads ({ configName } )") ;
444443
445- // Create a connection using the test configuration with a small batch size
444+ // Create a connection using the test configuration
446445 var connectionParams = new Dictionary < string , string >
447446 {
448447 [ DatabricksParameters . UseCloudFetch ] = useCloudFetch . ToString ( ) . ToLower ( )
@@ -451,24 +450,18 @@ public async Task StatusPollerKeepsQueryAlive(bool useCloudFetch, string configN
451450 using var statement = connection . CreateStatement ( ) ;
452451
453452 // Execute a query that should return data - using a larger dataset to ensure multiple batches
454- statement . SqlQuery = "SELECT id, CAST(id AS STRING) as id_string, id * 2 as id_doubled FROM RANGE(30000000 )" ;
453+ statement . SqlQuery = "SELECT id, CAST(id AS STRING) as id_string, id * 2 as id_doubled FROM RANGE(3000000 )" ;
455454 QueryResult result = statement . ExecuteQuery ( ) ;
456455
457456 Assert . NotNull ( result . Stream ) ;
458457
459- // Read first batch
460- using var firstBatch = await result . Stream . ReadNextRecordBatchAsync ( ) ;
461- Assert . NotNull ( firstBatch ) ;
462- int firstBatchRows = firstBatch . Length ;
463- OutputHelper ? . WriteLine ( $ "First batch: Read { firstBatchRows } rows") ;
464-
465458 // Simulate a long delay (30 minutes)
466459 OutputHelper ? . WriteLine ( "Simulating 30 minute delay..." ) ;
467460 await Task . Delay ( TimeSpan . FromMinutes ( 30 ) ) ;
468461
469462 // Read remaining batches
470- int totalRows = firstBatchRows ;
471- int batchCount = 1 ;
463+ int totalRows = 0 ;
464+ int batchCount = 0 ;
472465
473466 while ( result . Stream != null )
474467 {
@@ -482,7 +475,7 @@ public async Task StatusPollerKeepsQueryAlive(bool useCloudFetch, string configN
482475 }
483476
484477 // Verify we got all rows
485- Assert . Equal ( 30000000 , totalRows ) ;
478+ Assert . Equal ( 3000000 , totalRows ) ;
486479 Assert . True ( batchCount > 1 , "Should have read multiple batches" ) ;
487480 OutputHelper ? . WriteLine ( $ "Successfully read { totalRows } rows in { batchCount } batches after 30 minute delay with { configName } ") ;
488481 }
0 commit comments