Allow multiple E2E test iterations
This commit is contained in:
parent
b17f34d402
commit
4040c98754
1 changed files with 18 additions and 14 deletions
|
|
@ -4,6 +4,8 @@ import { sleep } from "./utils/sleep";
|
||||||
import { v4 as uuidv4 } from "uuid";
|
import { v4 as uuidv4 } from "uuid";
|
||||||
import { randomCasing } from "./utils/random-casing";
|
import { randomCasing } from "./utils/random-casing";
|
||||||
|
|
||||||
|
const TEST_ITERATIONS = 5;
|
||||||
|
|
||||||
// Simulate async file access by injecting waiting time before returning from file operations.
|
// Simulate async file access by injecting waiting time before returning from file operations.
|
||||||
let slowFileEvents = false;
|
let slowFileEvents = false;
|
||||||
|
|
||||||
|
|
@ -109,20 +111,22 @@ async function runTest({
|
||||||
}
|
}
|
||||||
|
|
||||||
async function runTests(): Promise<void> {
|
async function runTests(): Promise<void> {
|
||||||
for (const useSlowFileEvents of [false, true]) {
|
for (let i = 0; i < TEST_ITERATIONS; i++) {
|
||||||
for (const concurrency of [
|
for (const useSlowFileEvents of [false, true]) {
|
||||||
16,
|
for (const concurrency of [
|
||||||
1 // test with concurrency 1 to check for deadlocks
|
16,
|
||||||
]) {
|
1 // test with concurrency 1 to check for deadlocks
|
||||||
for (const doDeletes of [true, false]) {
|
]) {
|
||||||
await runTest({
|
for (const doDeletes of [true, false]) {
|
||||||
agentCount: 2,
|
await runTest({
|
||||||
concurrency,
|
agentCount: 2,
|
||||||
iterations: 100,
|
concurrency,
|
||||||
doDeletes,
|
iterations: 100,
|
||||||
useSlowFileEvents,
|
doDeletes,
|
||||||
jitterScaleInSeconds: 0.75
|
useSlowFileEvents,
|
||||||
});
|
jitterScaleInSeconds: 0.75
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue