Commit LLM generated test cases

This commit is contained in:
Andras Schmelczer 2026-03-25 21:38:31 +00:00
parent 0ce82353e0
commit 302f1fa3c4
110 changed files with 7761 additions and 0 deletions

View file

@ -0,0 +1,36 @@
import type { TestDefinition } from "../test-definition";
export const rapidSyncToggleTest: TestDefinition = {
name: "Rapid Sync Toggle",
description:
"Client 0 creates a file, then toggles sync off and on multiple times. " +
"The file should eventually sync to Client 1 without deadlocks or data loss.",
clients: 2,
steps: [
{ type: "enable-sync", client: 1 },
// Create a file while offline
{ type: "create", client: 0, path: "stable.md", content: "must survive toggles" },
// Toggle sync on client 0 multiple times
{ type: "enable-sync", client: 0 },
{ type: "disable-sync", client: 0 },
{ type: "enable-sync", client: 0 },
{ type: "disable-sync", client: 0 },
// Final enable — this one must succeed
{ type: "enable-sync", client: 0 },
{ type: "sync" },
{ type: "barrier" },
{ type: "assert-exists", client: 0, path: "stable.md" },
{ type: "assert-exists", client: 1, path: "stable.md" },
{
type: "assert-content",
client: 1,
path: "stable.md",
content: "must survive toggles"
},
{ type: "assert-consistent" }
]
};