mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
fix(benchmark): Fix some multi-main benchmarks failing randomly (#11317)
This commit is contained in:
parent
76724c3be6
commit
fcf8629c6e
|
@ -1,3 +1,5 @@
|
|||
import { sleep } from 'zx';
|
||||
|
||||
import { AuthenticatedN8nApiClient } from '@/n8n-api-client/authenticated-n8n-api-client';
|
||||
import type { N8nApiClient } from '@/n8n-api-client/n8n-api-client';
|
||||
import type { ScenarioDataFileLoader } from '@/scenario/scenario-data-loader';
|
||||
|
@ -47,6 +49,10 @@ export class ScenarioRunner {
|
|||
const testData = await this.dataLoader.loadDataForScenario(scenario);
|
||||
await testDataImporter.importTestScenarioData(testData.workflows);
|
||||
|
||||
// Wait for 1s before executing the scenario to ensure that the workflows are activated.
|
||||
// In multi-main mode it can take some time before the workflow becomes active.
|
||||
await sleep(1000);
|
||||
|
||||
console.log('Executing scenario script');
|
||||
await this.k6Executor.executeTestScenario(scenario, {
|
||||
scenarioRunName,
|
||||
|
|
Loading…
Reference in a new issue