mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 08:09:27 +00:00
## Summary The Pipelines E2E shard had **2 flaky tests** (`pipeline-core` → `deletePipelineByName` timing out) and ran in **~14.3 minutes**. This PR **fixes the flakiness** and **cuts the shard runtime by ~50%** — with **zero loss of test coverage** (every assertion and test step is preserved). ## 🎯 What we achieved | Metric | Before | After | |---|---|---| | **Shard runtime** | ~14.3m | **~6.5–7.1m (~50% faster)** | | **Flaky tests** | 2 | **0** | | Tests passing | 83 | 85 | | Test coverage | baseline | **unchanged** | ## 🔧 What we did ### Fixed the flakiness - **Scoped pipeline cleanup** — `beforeEach` no longer runs a **pool-wide cleanup** that deleted sibling tests' in-flight pipelines under parallel execution. **Each test now frees only its own source stream.** - **Worker-suffixed streams** — each test uses **`_w${parallelIndex}` stream names** so concurrent workers can **never collide** on shared streams. - **List-scan race guard** — the `openFirst*` helpers **re-check the row count each iteration** instead of clicking a row a concurrent test deleted (**was a 45s hang**). ### Reduced runtime - **Fixed the `dragStreamToTarget` phantom wait** — it waited **10 full seconds** on a selector that only exists for Stream nodes, so **every query/condition/function drag burned the full timeout**. Now it races all four node-form dialogs → **each resolves in ~1s**. → **`scheduled` dropped 1.6m → ~37s from this fix alone.** - **Trimmed `openPipelineMenu`** — replaced blind 1s+2s sleeps with a **`waitFor` on a real condition**. - **Parallelized the slow serial files** — flipped `pipeline-metrics`, `pipeline-traces`, and `pipelines-form-validation` from **`serial` → `parallel`** (each **verified parallel-safe** first). ## ⚠️ What we intentionally did NOT do - **No test steps, assertions, or validations were removed** — assertion counts are **identical before/after**. Only **redundant `waitForTimeout` idle**, stream-name scoping, and serial→parallel config changed. - **Load-bearing waits left untouched** — VueFlow canvas connects, realtime-pipeline activation, and intentional dwells are **preserved**. - **slowMo removal was tried and reverted** — **no reliable speedup** (the suite is wait-bound, not action-bound) and it added a deployed-env dependency. ## 📉 Slow-file poles — before vs after | File | Before | After | |---|---|---| | pipeline-metrics | 6.5m (serial) | **off slow list** | | pipeline-traces | 5.5m (serial) | **off slow list** | | pipelines-form-validation | 1.9m (serial) | **off slow list** | | scheduled-pipeline-query-builder | 1.6m | **~42s** | --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
zinc-observe-ui-automation
Playwright UI Testing
Installation
npm install
Running Tests
Using Playwright Runner UI (Recommended)
cd playwright-runner
npm start
Then open http://localhost:3000 to access the test runner interface.
Using Command Line
# Run all tests
npx playwright test
# Run specific test by tag
npx playwright test -g @alertsImportExport
# Run in headed mode
npx playwright test --headed
# Run specific test file
npx playwright test Alerts/alerts-import.spec.js
Environment Configuration
Tests can be configured using:
- Playwright Runner UI - Set environment variables through the web interface
- Environment Variables - Set variables in terminal or .env file