diff --git a/tests/int/operation-reservation-options.int.spec.ts b/tests/int/operation-reservation-options.int.spec.ts index 7573869..9fb0205 100644 --- a/tests/int/operation-reservation-options.int.spec.ts +++ b/tests/int/operation-reservation-options.int.spec.ts @@ -140,7 +140,11 @@ async function makeVehicle(status: "idle" | "assigned"): Promise { const vehicle = await payload.create({ collection: "game-vehicles", data: { - name: `${RUN} vic ${gameVehicleIds.length}`, + // "!" sorts before alphanumerics: the vehicle query serves the top + // MAX_VEHICLES idle vehicles sorted by name, so this keeps this run's + // fixtures inside the served window even on a DB crowded with older + // idle vehicles. + name: `!${RUN} vic ${gameVehicleIds.length}`, type: vehicleBlueprintId, deployedAt: gameStructureIds[0], status, diff --git a/tests/int/respawn-tickets.int.spec.ts b/tests/int/respawn-tickets.int.spec.ts index 4e452e8..919a856 100644 --- a/tests/int/respawn-tickets.int.spec.ts +++ b/tests/int/respawn-tickets.int.spec.ts @@ -248,7 +248,13 @@ describe("Respawn ticket settlement", () => { it("serves steamId-keyed balances above zero to the bridge", async () => { const tickets = await getTicketBalances(payload); - expect(tickets).toEqual({ + // The bridge map covers every member with a positive balance; scope the + // assertion to this run's steam ids so leaked rows from other sessions + // cannot break exact equality. + const runTickets = Object.fromEntries( + Object.entries(tickets).filter(([steamId]) => steamId.startsWith(`${RUN}-`)), + ); + expect(runTickets).toEqual({ [`${RUN}-sid-yes`]: 2, [`${RUN}-sid-tent`]: 0.5, [`${RUN}-sid-no`]: 0.25,