Skip to content

Commit cc3e493

Browse files
braulioboclaude
andcommitted
test(server): rebuild tests that stop at an old migration finish migrating first
The projection rebuild writes through the current tables, which now include the run item counts, so the two migration tests that ran it at migration 64 and 66 migrate fully before rebuilding. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
1 parent 6e2bdf0 commit cc3e493

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎apps/server/src/persistence/Migrations/064_CanonicalizeThreadPullRequestLinks.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ layer("064_CanonicalizeThreadPullRequestLinks", (it) => {
156156
`;
157157
assert.equal(v1?.payload_json, v1Payload);
158158

159+
// The rebuild writes through the current projection tables.
160+
yield* runMigrations();
159161
const maintenance = yield* ProjectionReplay.ProjectionReplay;
160162
assert.isTrue((yield* maintenance.rebuild).valid);
161163
for (const [host, repository, id] of [

‎apps/server/src/persistence/Migrations/066_RepairClientSettlementTimestamps.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,8 @@ layer("066_RepairClientSettlementTimestamps", (it) => {
363363
yield* Migration0066;
364364
assert.deepEqual(yield* snapshot, repaired);
365365

366+
// The rebuild writes through the current projection tables.
367+
yield* runMigrations();
366368
const maintenance = yield* ProjectionReplay.ProjectionReplay;
367369
assert.isTrue((yield* maintenance.rebuild).valid);
368370
assert.deepEqual(yield* imported, expectedImported);

0 commit comments

Comments
 (0)