fix(game): 가오픈 장수 삭제 대기를 실제 접수 시각에 맞춘다
미래 정식 오픈에 고정된 게임 시각과 durable input event 접수 시각을 분리한다. 일반 생성과 선택 풀 생성의 삭제 가능 시각 및 최초 접속 시각만 operational 시각을 사용하고 RNG와 턴 배치는 기존 논리 시각을 보존한다.
This commit is contained in:
@@ -257,12 +257,17 @@ integration('scenario 903 select pool through the durable turn daemon', () => {
|
||||
const initial = await db.general.findFirstOrThrow({ where: { userId } });
|
||||
const initialRuntime = runtime!.world.getGeneralById(initial.id);
|
||||
const initialAccess = await db.generalAccessLog.findUniqueOrThrow({ where: { generalId: initial.id } });
|
||||
const acceptedEvent = await db.inputEvent.findFirstOrThrow({
|
||||
where: { actorUserId: userId, eventType: 'selectPoolCreate', status: 'SUCCEEDED' },
|
||||
orderBy: { sequence: 'desc' },
|
||||
});
|
||||
if (!initialAccess.lastRefresh) {
|
||||
throw new Error('selected general must have an initial access timestamp');
|
||||
}
|
||||
expect(initialAccess.lastRefresh).toEqual(acceptedEvent.createdAt);
|
||||
expect(
|
||||
new Date((initial.meta as Record<string, unknown>).prestart_delete_after as string).getTime() -
|
||||
initialAccess.lastRefresh.getTime()
|
||||
acceptedEvent.createdAt.getTime()
|
||||
).toBe(2 * 5 * 60 * 1_000);
|
||||
expect(initialRuntime).toMatchObject({
|
||||
id: initial.id,
|
||||
|
||||
Reference in New Issue
Block a user