Skip to content

ci: Fix timing issue #17984

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

ci: Fix timing issue #17984

wants to merge 1 commit into from

Conversation

shortstacked
Copy link
Contributor

DB reset sometimes occurs before server is ready.
So added a small wait.

Summary

The server start up -> playwright test reset progression is too fast. The current way of waiting for the favicon isn't adequate. This is a quick work around.

Related Linear tickets, Github issues, and Community forum posts

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

DB reset sometimes occurs before server is ready.
@shortstacked shortstacked requested review from seemewalkin, a team and ivov and removed request for a team August 4, 2025 22:41
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic analysis

1 issue found across 1 file • Review in cubic

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

@@ -34,7 +34,8 @@ async function globalSetup() {
}

console.log(`🔄 Resetting database for ${n8nBaseUrl}...`);

// Quick hack till we find out a better health check for the database reset command!
await new Promise((resolve) => setTimeout(resolve, 3000));
Copy link
Contributor

Choose a reason for hiding this comment

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

Waiting a hard-coded 3000 ms adds unnecessary latency and can still race if the server takes longer than 3 s; prefer an explicit readiness/health-check or a configurable timeout.

Prompt for AI agents
Address the following comment on packages/testing/playwright/global-setup.ts at line 38:

<comment>Waiting a hard-coded 3000 ms adds unnecessary latency and can still race if the server takes longer than 3 s; prefer an explicit readiness/health-check or a configurable timeout.</comment>

<file context>
@@ -34,7 +34,8 @@ async function globalSetup() {
 	}
 
 	console.log(`🔄 Resetting database for ${n8nBaseUrl}...`);
-
+	// Quick hack till we find out a better health check for the database reset command!
+	await new Promise((resolve) =&gt; setTimeout(resolve, 3000));
 	// Create standalone API request context
 	const requestContext = await request.newContext({
</file context>

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant