From 4040c98754a3db45117ae94aca21e11d8dd5255d Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Sat, 24 May 2025 13:23:17 +0100 Subject: [PATCH] Allow multiple E2E test iterations --- frontend/test-client/src/cli.ts | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/frontend/test-client/src/cli.ts b/frontend/test-client/src/cli.ts index 6e5ede9..ae4f7e8 100644 --- a/frontend/test-client/src/cli.ts +++ b/frontend/test-client/src/cli.ts @@ -4,6 +4,8 @@ import { sleep } from "./utils/sleep"; import { v4 as uuidv4 } from "uuid"; import { randomCasing } from "./utils/random-casing"; +const TEST_ITERATIONS = 5; + // Simulate async file access by injecting waiting time before returning from file operations. let slowFileEvents = false; @@ -109,20 +111,22 @@ async function runTest({ } async function runTests(): Promise { - for (const useSlowFileEvents of [false, true]) { - for (const concurrency of [ - 16, - 1 // test with concurrency 1 to check for deadlocks - ]) { - for (const doDeletes of [true, false]) { - await runTest({ - agentCount: 2, - concurrency, - iterations: 100, - doDeletes, - useSlowFileEvents, - jitterScaleInSeconds: 0.75 - }); + for (let i = 0; i < TEST_ITERATIONS; i++) { + for (const useSlowFileEvents of [false, true]) { + for (const concurrency of [ + 16, + 1 // test with concurrency 1 to check for deadlocks + ]) { + for (const doDeletes of [true, false]) { + await runTest({ + agentCount: 2, + concurrency, + iterations: 100, + doDeletes, + useSlowFileEvents, + jitterScaleInSeconds: 0.75 + }); + } } } }