Skip to content

Commit b9a4f17

Browse files
Copilotdavismcphee
andauthored
Stabilize Discover telemetry context assertions in FTR (elastic#263224)
The Discover context-awareness functional test was intermittently failing on CI when `performance_metric` telemetry had not arrived within the test’s fetch window. ## Changes Made - Increased `withTimeoutMs` from `500` to `1500` for the two affected `performance_metric` event fetches in `src/platform/test/functional/apps/discover/context_awareness/_telemetry.ts` - Kept the original assertion flow for those checks without adding retry wrappers or new guard assertions This keeps the fix narrowly focused on giving telemetry more time to arrive in slower CI runs while preserving the original test structure. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: davismcphee <25592674+davismcphee@users.noreply.github.com>
1 parent 54428ac commit b9a4f17

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • src/platform/test/functional/apps/discover/context_awareness

src/platform/test/functional/apps/discover/context_awareness/_telemetry.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
3232
const kibanaServer = getService('kibanaServer');
3333
const dashboardAddPanel = getService('dashboardAddPanel');
3434
const toasts = getService('toasts');
35+
const performanceMetricTimeoutMs = 1500;
3536

3637
describe('telemetry', () => {
3738
describe('context', () => {
@@ -61,7 +62,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
6162

6263
const events = await ebtUIHelper.getEvents(Number.MAX_SAFE_INTEGER, {
6364
eventTypes: ['performance_metric'],
64-
withTimeoutMs: 500,
65+
withTimeoutMs: performanceMetricTimeoutMs,
6566
});
6667

6768
expect(events[events.length - 1].context.discoverProfiles).to.eql([
@@ -81,7 +82,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
8182

8283
const events = await ebtUIHelper.getEvents(Number.MAX_SAFE_INTEGER, {
8384
eventTypes: ['performance_metric'],
84-
withTimeoutMs: 500,
85+
withTimeoutMs: performanceMetricTimeoutMs,
8586
});
8687

8788
expect(events[events.length - 1].context.discoverProfiles).to.eql([

0 commit comments

Comments
 (0)