-
Notifications
You must be signed in to change notification settings - Fork 711
fix(e2e): resolve SDR test failures with test isolation and retry logic #9632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…cution - Add unique run ID and worker index to stream names to prevent conflicts - Pipeline conditions tests now use `e2e_conditions_*_<runId>_w<idx>` pattern - Schemaload tests now use `stress_test_<runId>_w<idx>` pattern - Add stream deletion verification methods to apiCleanup.js - Fix networkidle timeouts in schemaLoadPage.js with non-blocking waits - Remove redundant data ingestion from pipeline-conditions test bodies - Update cleanup.spec.js comments to reflect new naming strategy This fixes "stream is being deleted" errors that occurred when parallel tests competed for shared stream names, or when streams from previous test runs were still being deleted asynchronously.
- Add unique testRunId to pattern and stream names for test isolation - Add retry logic to checkPatternExists for backend indexing delays - Add search box filtering in selectStream for reliable stream selection - Add retry logic for Stream Detail button in stream association page - Fix ingestion retry with exponential backoff for "stream being deleted" errors - Update regexPatternManagement test with unique pattern names All 23 SDR tests now pass reliably in parallel execution.
- Add unique testRunId to pattern and stream names for test isolation - Add retry logic to checkPatternExists for backend indexing delays - Add search box filtering in selectStream for reliable stream selection - Add retry logic for Stream Detail button in stream association page - Fix ingestion retry with exponential backoff for "stream being deleted" errors - Update regexPatternManagement test with unique pattern names All 23 SDR tests now pass reliably in parallel execution.
26893f5 to
82181bc
Compare
… into e2e-sdrfix
|
Failed to generate code suggestions for PR |
Greptile OverviewGreptile SummaryThis PR improves SDR (Sensitive Data Redaction) E2E test reliability by adding test isolation and retry logic to handle parallel execution and backend timing issues.
Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Test as SDR Test
participant LogsPage as logsPage.js
participant API as Backend API
participant UI as UI Components
Test->>LogsPage: ingestMultipleFields(streamName, data)
loop Retry up to 5 times
LogsPage->>API: POST /api/{org}/{stream}/_json
alt Success (200)
API-->>LogsPage: OK
LogsPage->>LogsPage: Wait 5s for indexing
else "Stream being deleted" error
API-->>LogsPage: Error
LogsPage->>LogsPage: Exponential backoff wait
end
end
Test->>LogsPage: selectStream(streamName)
LogsPage->>API: GET /api/{org}/streams (waitForStreamAvailable)
loop Poll until found or timeout
API-->>LogsPage: Stream list
LogsPage->>LogsPage: Check if stream exists
end
LogsPage->>UI: Navigate to logs URL
loop Retry up to 3 times
LogsPage->>UI: Click dropdown, search, scroll
alt Stream found
UI-->>LogsPage: Stream selected
else Not found
LogsPage->>UI: Escape, wait 5s, retry
end
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
12 files reviewed, 1 comment
tests/ui-testing/playwright-tests/SDR/ingestionTimeDrop.spec.js
Outdated
Show resolved
Hide resolved
Move the ingestMultipleFields function from 6 SDR spec files into the shared logsPage.js page object to eliminate code duplication.
- Update navigateToRegexPatterns and navigateToStreams to use direct URL navigation with process.env.ORGNAME - Fix hardcoded /api/default/ patterns in response URL matching to use dynamic org name - Update apiCleanup regex pattern cleanup to use prefix matching for patterns with unique test suffixes - Improve importPatternsFromFile to verify patterns exist on page instead of relying on snackbar message 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Add unique testRunId suffix to pattern names and stream name - Make test fully self-contained (creates own patterns instead of importing) - Extend timeout to 5 minutes for the 10-step sequential test - Simplify importPatternsFromFile in sdrPatternsPage.js
Add prefixes for SDR test patterns that were not being cleaned up: - duplicate_test_ (regexPatternManagement.spec.js) - log_filename_, time_hh_mm_ss_, ifsc_code_, date_dd_mm_yyyy_ (multipleSDRPatterns.spec.js) - email_format_, us_phone_, credit_card_, ssn_ (other SDR tests)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
16 files reviewed, no comments
Fix stats.startTime type mismatch error by using latest tdpw version which handles numeric timestamps from Playwright reports.
Summary
checkPatternExistsfor backend indexing delays (3 attempts with 2s wait)selectStreamfor reliable stream selection in long listsTest plan