Skip to content

Commit adca408

Browse files
author
Jade Wang
committed
Verify all Phase 2 SEA E2E tests pass\n\nTask ID: task-2.5-verify-phase2-tests
1 parent 6249886 commit adca408

File tree

2 files changed

+67
-1
lines changed

2 files changed

+67
-1
lines changed

csharp/test/E2E/Telemetry/SEAChunkDetailsTelemetryTests.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ public async Task SEACloudFetch_AllChunkDetailsFields_ArePopulated()
152152
statement.Dispose();
153153
}
154154

155+
// Dispose connection to trigger telemetry flush
156+
connection.Dispose();
157+
connection = null;
158+
155159
// Wait for telemetry to be emitted
156160
var logs = await TelemetryTestHelpers.WaitForTelemetryEvents(exporter, expectedCount: 1, timeoutMs: 10000);
157161

@@ -278,6 +282,13 @@ public async Task SEACloudFetch_SlowestChunkLatency_GteInitial()
278282
statement.Dispose();
279283
}
280284

285+
// Dispose connection to trigger telemetry flush
286+
connection.Dispose();
287+
connection = null;
288+
289+
// Small delay to ensure async flush completes
290+
await Task.Delay(500);
291+
281292
var logs = await TelemetryTestHelpers.WaitForTelemetryEvents(exporter, expectedCount: 1, timeoutMs: 10000);
282293

283294
Assert.NotEmpty(logs);
@@ -331,6 +342,13 @@ public async Task SEACloudFetch_SumDownloadTime_GteSlowest()
331342
statement.Dispose();
332343
}
333344

345+
// Dispose connection to trigger telemetry flush
346+
connection.Dispose();
347+
connection = null;
348+
349+
// Small delay to ensure async flush completes
350+
await Task.Delay(500);
351+
334352
var logs = await TelemetryTestHelpers.WaitForTelemetryEvents(exporter, expectedCount: 1, timeoutMs: 10000);
335353

336354
Assert.NotEmpty(logs);
@@ -384,6 +402,13 @@ public async Task SEACloudFetch_TotalChunksIterated_LtePresent()
384402
statement.Dispose();
385403
}
386404

405+
// Dispose connection to trigger telemetry flush
406+
connection.Dispose();
407+
connection = null;
408+
409+
// Small delay to ensure async flush completes
410+
await Task.Delay(500);
411+
387412
var logs = await TelemetryTestHelpers.WaitForTelemetryEvents(exporter, expectedCount: 1, timeoutMs: 10000);
388413

389414
Assert.NotEmpty(logs);

csharp/test/E2E/Telemetry/SEAStatementTelemetryTests.cs

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ public async Task SEAStatement_QueryEmitsTelemetry()
146146
statement.Dispose();
147147
}
148148

149+
// Dispose connection to trigger telemetry flush
150+
connection.Dispose();
151+
connection = null;
152+
149153
// Wait for telemetry to be emitted
150154
var logs = await TelemetryTestHelpers.WaitForTelemetryEvents(exporter, expectedCount: 1);
151155

@@ -191,6 +195,13 @@ public async Task SEAStatement_OperationTypeIsExecuteStatementAsync()
191195
statement.Dispose();
192196
}
193197

198+
// Dispose connection to trigger telemetry flush
199+
connection.Dispose();
200+
connection = null;
201+
202+
// Small delay to ensure async flush completes
203+
await Task.Delay(500);
204+
194205
// Wait for telemetry to be emitted
195206
var logs = await TelemetryTestHelpers.WaitForTelemetryEvents(exporter, expectedCount: 1);
196207

@@ -235,6 +246,13 @@ public async Task SEAStatement_ExecutionResultMatchesDisposition()
235246
statement.Dispose();
236247
}
237248

249+
// Dispose connection to trigger telemetry flush
250+
connection.Dispose();
251+
connection = null;
252+
253+
// Small delay to ensure async flush completes
254+
await Task.Delay(500);
255+
238256
// Wait for telemetry to be emitted
239257
var logs = await TelemetryTestHelpers.WaitForTelemetryEvents(exporter, expectedCount: 1);
240258

@@ -294,6 +312,13 @@ public async Task SEAStatement_ErrorInfoForFailedQueries()
294312
statement.Dispose();
295313
}
296314

315+
// Dispose connection to trigger telemetry flush
316+
connection.Dispose();
317+
connection = null;
318+
319+
// Small delay to ensure async flush completes
320+
await Task.Delay(500);
321+
297322
// Wait for telemetry to be emitted
298323
var logs = await TelemetryTestHelpers.WaitForTelemetryEvents(exporter, expectedCount: 1);
299324

@@ -338,6 +363,13 @@ public async Task SEAStatement_OperationLatencyIsPositive()
338363
statement.Dispose();
339364
}
340365

366+
// Dispose connection to trigger telemetry flush
367+
connection.Dispose();
368+
connection = null;
369+
370+
// Small delay to ensure async flush completes
371+
await Task.Delay(500);
372+
341373
// Wait for telemetry to be emitted
342374
var logs = await TelemetryTestHelpers.WaitForTelemetryEvents(exporter, expectedCount: 1);
343375

@@ -386,6 +418,10 @@ public async Task SEAStatement_AllExitCriteriaMet()
386418
statement.Dispose();
387419
}
388420

421+
// Dispose connection to trigger telemetry flush before checking first query
422+
connection.Dispose();
423+
connection = null;
424+
389425
// Wait for telemetry to be emitted
390426
var logs = await TelemetryTestHelpers.WaitForTelemetryEvents(exporter, expectedCount: 1);
391427

@@ -413,8 +449,9 @@ public async Task SEAStatement_AllExitCriteriaMet()
413449
OutputHelper?.WriteLine($"✓ Exit criterion 5: operation_latency_ms = {protoLog.OperationLatencyMs}ms");
414450

415451
// Exit criterion 4: Error telemetry works for SEA failures
416-
// Reset exporter for error test
452+
// Reset exporter for error test and create new connection
417453
exporter.Reset();
454+
(connection, exporter) = CreateRestConnectionWithCapturingTelemetry();
418455

419456
using (var statement = connection.CreateStatement())
420457
{
@@ -434,6 +471,10 @@ public async Task SEAStatement_AllExitCriteriaMet()
434471
statement.Dispose();
435472
}
436473

474+
// Dispose connection to trigger telemetry flush
475+
connection.Dispose();
476+
connection = null;
477+
437478
// Wait for telemetry
438479
var errorLogs = await TelemetryTestHelpers.WaitForTelemetryEvents(exporter, expectedCount: 1);
439480
Assert.NotEmpty(errorLogs);

0 commit comments

Comments
 (0)