Skip to content

Commit 9075b7b

Browse files
committed
Fix status poller test
1 parent 33e14e7 commit 9075b7b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

csharp/test/Drivers/Databricks/E2E/StatementTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -908,9 +908,9 @@ private async Task PrepareTableAsync(string fullTableName, string sqlResourceLoc
908908

909909
// NOTE: this is a thirty minute test. As of writing, databricks commands have 20 minutes of idle time (and checked every 5 minutes)
910910
[SkippableTheory]
911-
[InlineData(false, "CloudFetch disabled")]
912-
[InlineData(true, "CloudFetch enabled")]
913-
public async Task StatusPollerKeepsQueryAlive(bool useCloudFetch, string configName)
911+
[InlineData(false, "CloudFetch disabled", 30000000)]
912+
[InlineData(true, "CloudFetch enabled", 3000000000)]
913+
public async Task StatusPollerKeepsQueryAlive(bool useCloudFetch, string configName, long rowCount)
914914
{
915915
Skip.If(TestConfiguration.IsCITesting, "Skip test in CI testing");
916916

@@ -925,7 +925,7 @@ public async Task StatusPollerKeepsQueryAlive(bool useCloudFetch, string configN
925925
using var statement = connection.CreateStatement();
926926

927927
// Execute a query that should return data - using a larger dataset to ensure multiple batches
928-
statement.SqlQuery = "SELECT id, CAST(id AS STRING) as id_string, id * 2 as id_doubled FROM RANGE(30000000)";
928+
statement.SqlQuery = $"SELECT id, CAST(id AS STRING) as id_string, id * 2 as id_doubled FROM RANGE({rowCount})";
929929
QueryResult result = statement.ExecuteQuery();
930930

931931
Assert.NotNull(result.Stream);
@@ -950,7 +950,7 @@ public async Task StatusPollerKeepsQueryAlive(bool useCloudFetch, string configN
950950
}
951951

952952
// Verify we got all rows
953-
Assert.Equal(30000000, totalRows);
953+
Assert.Equal(rowCount, totalRows);
954954
Assert.True(batchCount > 1, "Should have read multiple batches");
955955
OutputHelper?.WriteLine($"Successfully read {totalRows} rows in {batchCount} batches after 30 minute delay with {configName}");
956956
}

0 commit comments

Comments
 (0)