Skip to content

The open alternative to Salesforce, designed for AI.

Give integration waits a generous budget and retry cold installs (#28729)

martmull9d080401d472
diff --git a/packages/twenty-server/jest-integration.config.ts b/packages/twenty-server/jest-integration.config.ts
index 53e65541f61..273bb91add9 100644
--- a/packages/twenty-server/jest-integration.config.ts
+++ b/packages/twenty-server/jest-integration.config.ts
@@ -41,7 +41,7 @@ const jestConfig: JestConfigWithTsJest = {
setupFilesAfterEnv: [
'<rootDir>/test/integration/utils/setup-wait-for-all-jobs-between-tests.ts',
],
- testTimeout: 20000,
+ testTimeout: 90000,
maxWorkers: 1,
// ESM-only deps (jsdom 29 and msw chains, ai, @ai-sdk/*, @workflow/serde) that swc must transform for jest
transformIgnorePatterns: [
diff --git a/packages/twenty-server/test/integration/graphql/suites/workflow/core-workflow-execution.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/workflow/core-workflow-execution.integration-spec.ts
index e477c2549d9..d8702a140d2 100644
--- a/packages/twenty-server/test/integration/graphql/suites/workflow/core-workflow-execution.integration-spec.ts
+++ b/packages/twenty-server/test/integration/graphql/suites/workflow/core-workflow-execution.integration-spec.ts
@@ -236,7 +236,7 @@ describe('core workflow execution and queue compatibility (e2e)', () => {
};
const waitForRun = async (runId: string, status: string) => {
- for (let attempt = 0; attempt < 150; attempt++) {
+ for (let attempt = 0; attempt < 600; attempt++) {
const run = await getRun(runId);
if (run?.status === status) {
@@ -655,7 +655,7 @@ describe('core workflow execution and queue compatibility (e2e)', () => {
throw new Error('Cron failed to dispatch');
});
const waitForStep = async (runId: string, stepId: string, status: string) => {
- for (let attempt = 0; attempt < 150; attempt++) {
+ for (let attempt = 0; attempt < 600; attempt++) {
const run = await getRun(runId);
if (run?.state?.stepInfos[stepId]?.status === status) {
diff --git a/packages/twenty-server/test/integration/graphql/suites/workflow/utils/workflow-run-test.util.ts b/packages/twenty-server/test/integration/graphql/suites/workflow/utils/workflow-run-test.util.ts
index e8bfc99d08d..c3684c2591f 100644
--- a/packages/twenty-server/test/integration/graphql/suites/workflow/utils/workflow-run-test.util.ts
+++ b/packages/twenty-server/test/integration/graphql/suites/workflow/utils/workflow-run-test.util.ts
@@ -94,7 +94,7 @@ const PENDING_WORKFLOW_RUN_STATUSES: WorkflowRunStatusType[] = [
export const waitForWorkflowCompletion = async (
workflowRunId: string,
- maxAttempts = 30,
+ maxAttempts = 120,
intervalMs = 500,
): Promise<WorkflowRunResponse | null> => {
let workflowRun = await getWorkflowRun(workflowRunId);
@@ -117,7 +117,7 @@ export const waitForWorkflowRunStepStatus = async (
workflowRunId: string,
stepId: string,
expectedStatus: string,
- maxAttempts = 30,
+ maxAttempts = 120,
intervalMs = 500,
): Promise<WorkflowRunResponse | null> => {
let workflowRun = await getWorkflowRun(workflowRunId);
@@ -140,7 +140,7 @@ export const waitForWorkflowRunStepStatus = async (
export const waitForWorkflowRunStatus = async (
workflowRunId: string,
expectedStatus: WorkflowRunStatusType,
- maxAttempts = 30,
+ maxAttempts = 120,
intervalMs = 500,
): Promise<WorkflowRunResponse | null> => {
let workflowRun = await getWorkflowRun(workflowRunId);
diff --git a/packages/twenty-server/test/integration/utils/expect-eventually.util.ts b/packages/twenty-server/test/integration/utils/expect-eventually.util.ts
index 4efcb1ccb80..d6708f9b127 100644
--- a/packages/twenty-server/test/integration/utils/expect-eventually.util.ts
+++ b/packages/twenty-server/test/integration/utils/expect-eventually.util.ts
@@ -5,7 +5,7 @@ type ExpectEventuallyOptions = {
export const expectEventually = async (
assertion: () => Promise<void> | void,
- { timeoutMs = 10_000, intervalMs = 100 }: ExpectEventuallyOptions = {},
+ { timeoutMs = 45_000, intervalMs = 100 }: ExpectEventuallyOptions = {},
): Promise<void> => {
const startedAt = Date.now();