Skip to content

fix: retry log searches in e2e tests to handle slow ingestion in CI#3318

Open
laraujo7 wants to merge 1 commit intoLogflare:mainfrom
laraujo7:la/e2e-flaky-log-search-retry
Open

fix: retry log searches in e2e tests to handle slow ingestion in CI#3318
laraujo7 wants to merge 1 commit intoLogflare:mainfrom
laraujo7:la/e2e-flaky-log-search-retry

Conversation

@laraujo7
Copy link
Copy Markdown
Contributor

No description provided.

@laraujo7 laraujo7 force-pushed the la/e2e-flaky-log-search-retry branch from e2e6d2f to f88591d Compare March 29, 2026 11:26
import { Page } from '@playwright/test';
import { Page } from '@playwright/test';

const SEARCH_TIMEOUT = 30_000;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

30s is very long. Can we halve it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, possibly. In the worst case, it will run the search for up to 30 seconds.

I’m not entirely sure what’s happening, but my guess is that the logs take a bit of time to appear. So when I perform the search, the log might not be available yet. In this PR, I added a short wait and then retry the search.

I initially set the timeout to 30 seconds, but since it exits early if the log is found, it won’t always take that long. I’ve now reduced it to 10 seconds, which should be sufficient.

@laraujo7 laraujo7 force-pushed the la/e2e-flaky-log-search-retry branch from f88591d to 618ae2d Compare March 31, 2026 12:34
@laraujo7 laraujo7 force-pushed the la/e2e-flaky-log-search-retry branch from 618ae2d to 5b88925 Compare March 31, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants