test(): test dynamic max workers and improve CI (#13516)

* test(): test dynamic max workers

* test(): test dynamic max workers

* test(): test dynamic max workers

* test(): test dynamic max workers

* test(): test dynamic max workers

* test(): test dynamic max workers

* test(): test dynamic max workers

* test(): test dynamic max workers

* test(): test dynamic max workers

* test(): test dynamic max workers

* test(): test dynamic max workers

* test(): test dynamic max workers

* test(): test dynamic max workers

* test(): test dynamic max workers

* test(): test dynamic max workers

* test(): test dynamic max workers

* Clarify test description and improve CI
This commit is contained in:
Adrien de Peretti
2025-09-16 11:11:03 +02:00
committed by GitHub
parent b6d96a1b03
commit 25634b0382
47 changed files with 131 additions and 113 deletions

View File

@@ -91,7 +91,7 @@ async function populateData(api: any) {
)
const products = response.data.created
await setTimeout(10000)
await setTimeout(5000)
return products
}
@@ -144,6 +144,8 @@ medusaIntegrationTestRunner({
},
})
await setTimeout(1000)
const query = appContainer.resolve(
ContainerRegistrationKeys.QUERY
) as RemoteQueryFunction
@@ -200,11 +202,7 @@ medusaIntegrationTestRunner({
},
},
}),
({ data }) => data.length > 0,
{
retries: 3,
waitSeconds: 3,
}
({ data }) => data.length > 0
)
expect(resultset.metadata).toEqual({
@@ -366,11 +364,7 @@ medusaIntegrationTestRunner({
},
},
}),
({ data }) => data.length > 0,
{
retries: 3,
waitSeconds: 3,
}
({ data }) => data.length > 0
)
// Limiting to 1 on purpose to keep it simple and check the correct order is maintained
@@ -424,11 +418,7 @@ medusaIntegrationTestRunner({
},
},
}),
({ data }) => data.length > 0,
{
retries: 3,
waitSeconds: 3,
}
({ data }) => data.length > 0
)
// Limiting to 1 on purpose to keep it simple and check the correct order is maintained
@@ -478,11 +468,7 @@ medusaIntegrationTestRunner({
},
},
}),
({ data }) => data.length > 0,
{
retries: 3,
waitSeconds: 3,
}
({ data }) => data.length > 0
)
expect(resultset.data.length).toEqual(2)
@@ -504,11 +490,7 @@ medusaIntegrationTestRunner({
origin_country: ["USA"],
},
}),
({ data }) => data.length > 0,
{
retries: 3,
waitSeconds: 3,
}
({ data }) => data.length > 0
)
expect(resultset.data.length).toEqual(1)
@@ -533,6 +515,8 @@ medusaIntegrationTestRunner({
},
})
await setTimeout(1000)
const query = appContainer.resolve(
ContainerRegistrationKeys.QUERY
) as RemoteQueryFunction
@@ -551,8 +535,8 @@ medusaIntegrationTestRunner({
}),
({ data }) => data.length > 0,
{
retries: 3,
waitSeconds: 3,
retries: 5,
waitSeconds: 1.5,
}
)
expect(resultset.data.length).toEqual(1)

View File

@@ -113,11 +113,7 @@ medusaIntegrationTestRunner({
},
},
}),
({ data }) => data.length > 0,
{
retries: 3,
waitSeconds: 3,
}
({ data }) => data.length > 0
)
expect(results.length).toBe(1)
@@ -171,11 +167,7 @@ medusaIntegrationTestRunner({
},
},
}),
({ data }) => data.length > 0,
{
retries: 3,
waitSeconds: 3,
}
({ data }) => data.length > 0
)
expect(results.length).toBe(1)

View File

@@ -5,8 +5,8 @@
"license": "MIT",
"private": true,
"scripts": {
"test:integration": "jest --no-cache --maxWorkers=50% --bail --detectOpenHandles --forceExit --logHeapUsage",
"test:integration:chunk": "jest --silent --no-cache --bail --maxWorkers=50% --forceExit",
"test:integration": "jest --no-cache --bail --detectOpenHandles --forceExit --logHeapUsage",
"test:integration:chunk": "jest --silent --no-cache --bail --forceExit",
"build": "tsc --allowJs --outDir ./dist"
},
"dependencies": {