Skip to content
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

Fix Flaky Phishing Detection Integration Tests #3242

Closed
wants to merge 4 commits into from

Conversation

not-a-rootkit
Copy link
Collaborator

@not-a-rootkit not-a-rootkit commented Sep 10, 2024

Task/Issue URL: https://app.asana.com/0/0/1208253815417569/f
Tech Design URL:
CC:

Description:
Although the tests passed reliably locally, they are currently flaky in CI, due to the timeouts in waitForPageToLoad. Instead we introduce the same pattern we use for PrivacyDashboard and other ErrorPage tests:

let isPhishingPromise = tab.privacyInfoPublisher
    .compactMap { $0?.$isPhishing }
    .map { _ in expectedIsPhishing }
    .timeout(10)
    .first()
    .promise()
let navigationFailedPromise = tab.$error.compactMap { $0 }.timeout(5).first().promise()

This allows us to not have to wait for particular navigation events, but instead wait for changes in internal state, which should be significantly more reliable.

Steps to test this PR:

  1. Run PhishingDetectionIntegrationTests.
  2. Ensure they all pass reliably.

Definition of Done:


Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

Copy link
Contributor

This PR has been inactive for more than 7 days and will be automatically closed 7 days from now.

@github-actions github-actions bot added the stale label Sep 23, 2024
Copy link
Contributor

github-actions bot commented Oct 1, 2024

This PR has been closed after 14 days of inactivity. Feel free to reopen it if you plan to continue working on it or have further discussions.

@github-actions github-actions bot closed this Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant