test: 조건부 통합 fixture의 시계와 소유권을 격리한다

This commit is contained in:
2026-08-24 09:18:52 +00:00
parent 7a1254cb3a
commit 69000d4cb9
9 changed files with 78 additions and 26 deletions
@@ -472,7 +472,9 @@ integration('scenario 903 select pool through the durable turn daemon', () => {
}, 30_000);
it('keeps a stable ENGINE event for retries and rejects reservation bypasses', async () => {
const logicalNowMs = runtime!.world.getGameNow(new Date()).getTime();
const logicalNow = runtime!.world.getGameNow(new Date());
const logicalNowMs = logicalNow.getTime();
const logicalNowTick = runtime!.world.dateToGameTick(logicalNow);
const reservation = await appRouter
.createCaller(buildContext('select-pool-other-reserve', otherAuth))
.join.getSelectionPool();
@@ -488,7 +490,10 @@ integration('scenario 903 select pool through the durable turn daemon', () => {
await db.selectPoolEntry.update({
where: { uniqueName: candidate.uniqueName },
data: { reservedUntil: new Date(logicalNowMs - 60_000) },
data: {
reservedUntil: new Date(logicalNowMs - 60_000),
reservedUntilTick: BigInt(logicalNowTick - 1),
},
});
await expect(
appRouter.createCaller(buildContext('select-pool-expired-token', otherAuth)).join.selectPoolGeneral({