Files
openobserve/tests
Shrinath RaoandClaude Opus 4.8 a0bdebb711 test: reduce e2e flakes — pipelines ingest keep-alive, dashboard chartJson popup, logs _o2_id (#12813)
Reduces three independent e2e flakes. All test-infra only; no product
code.

## 1. Pipelines — `ingestData` "Premature close" (the original failure)
`LogsPage.ingestData` failed all records with `Failed to ingest N out of
N`. Server returned HTTP 200 and ingested every record, but node-fetch
2.7.0 reused a keep-alive socket the server closed during the 500ms
inter-record gap → "Premature close" reading the body (0/384 succeeded).
Fix: disable keep-alive (fresh connection per request, per-protocol
agent) + per-record retry. Verified: Pipelines shard green.

## 2. Dashboards-Core — `dashboard-chartJson.spec.js` popup flake
Custom-query tests (1 failed + 3 flaky) failed at the JSON/non-timestamp
checkbox with "popper intercepts pointer events" / detached timeouts.
Root cause (reproduced 100% locally): the field-property ODropdown
auto-closes within ~300ms when opened right after the panel's first
render — a late field-list re-render dismisses it. `toBeVisible()`
passes at t=0 but the checkbox is gone by click time. Fix:
`openFieldPropertyPopup` now opens, confirms the popup STAYS open, and
re-opens if it auto-closed (throws if it never stays open — no masking).
Verified locally across repeated runs.

## 3. Logs-Builder — `unflattened.spec.js` `_o2_id` readiness
Failed with `Failed to find _o2_id field after 3 attempts`; CI log shows
the UI detail was empty (`fields: []`) — re-ingested data wasn't
search-visible yet on the contended runner. The readiness gate existed
but its result was ignored, so the test fell through to a doomed UI scan
and burned all 4 retries (~26 min). Fix: respect the gate's result (on
timeout, wait once more and log), and widen the UI row scan 10→15. The
final assertion is unchanged — a genuinely absent `_o2_id` still throws.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 13:47:10 +00:00
..
2024-09-22 17:57:47 +08:00