claude
This commit is contained in:
parent
39c5591d36
commit
35877b69da
1 changed files with 3149 additions and 1851 deletions
|
|
@ -2,7 +2,6 @@ import type { TestDefinition, TestResult, TestStep } from "./test-definition";
|
|||
import { DeterministicAgent } from "./deterministic-agent";
|
||||
import type { ServerControl } from "./server-control";
|
||||
import type { SyncSettings, Logger } from "sync-client";
|
||||
import { CONFLICT_PATH_REGEX } from "sync-client";
|
||||
import { assert } from "./utils/assert";
|
||||
import { AssertableState } from "./utils/assertable-state";
|
||||
import { sleep } from "./utils/sleep";
|
||||
|
|
@ -15,10 +14,6 @@ import {
|
|||
} from "./consts";
|
||||
import { randomUUID } from "node:crypto";
|
||||
|
||||
class ConflictFilesDetectedError extends Error {
|
||||
public override readonly name = "ConflictFilesDetectedError";
|
||||
}
|
||||
|
||||
export class TestRunner {
|
||||
private agents: DeterministicAgent[] = [];
|
||||
private readonly serverControl: ServerControl;
|
||||
|
|
@ -236,9 +231,6 @@ export class TestRunner {
|
|||
this.logger.info("Barrier complete: all clients converged");
|
||||
return;
|
||||
} catch (error) {
|
||||
if (error instanceof ConflictFilesDetectedError) {
|
||||
throw error;
|
||||
}
|
||||
lastError =
|
||||
error instanceof Error ? error : new Error(String(error));
|
||||
this.logger.info("Barrier: not yet converged, retrying...");
|
||||
|
|
@ -304,25 +296,6 @@ export class TestRunner {
|
|||
clientFiles.push(fileMap);
|
||||
}
|
||||
|
||||
const conflictsByClient = clientFiles.map((files) =>
|
||||
Array.from(files.keys()).filter((path) =>
|
||||
CONFLICT_PATH_REGEX.test(path)
|
||||
)
|
||||
);
|
||||
if (conflictsByClient.some((conflicts) => conflicts.length > 0)) {
|
||||
const summary = conflictsByClient
|
||||
.map((conflicts, i) =>
|
||||
conflicts.length > 0
|
||||
? `client ${i}: [${conflicts.join(", ")}]`
|
||||
: null
|
||||
)
|
||||
.filter((s): s is string => s !== null)
|
||||
.join("; ");
|
||||
throw new ConflictFilesDetectedError(
|
||||
`Found local conflict file(s): ${summary}`
|
||||
);
|
||||
}
|
||||
|
||||
const referenceFiles = Array.from(clientFiles[0].keys());
|
||||
|
||||
this.logger.info(
|
||||
|
|
|
|||
Loading…
Reference in a new issue