refactor(cloud): group relay assignment locking tests (#36671)

This commit is contained in:
Neil
2026-10-31 04:55:00 -07:00
committed by GitHub
parent 002e975e96
commit fe9bbb18bf
4 changed files with 10 additions and 10 deletions
@@ -1,6 +1,6 @@
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
import { RelayAssignmentStore } from './assignment-store.js'
import { openRelayDatabase, type RelayDatabase } from './database.js'
import { RelayAssignmentStore } from '../assignment-store.js'
import { openRelayDatabase, type RelayDatabase } from '../database.js'
const databaseUrl = process.env.ORCA_RELAY_TEST_POSTGRES_URL
const describePostgres = databaseUrl ? describe : describe.skip
@@ -1,6 +1,6 @@
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
import { RelayAssignmentStore } from './assignment-store.js'
import { openRelayDatabase, type RelayDatabase } from './database.js'
import { RelayAssignmentStore } from '../assignment-store.js'
import { openRelayDatabase, type RelayDatabase } from '../database.js'
const databaseUrl = process.env.ORCA_RELAY_TEST_POSTGRES_URL
const describePostgres = databaseUrl ? describe : describe.skip
@@ -1,7 +1,7 @@
import { describe, expect, it } from 'vitest'
import { RelayAssignmentStore } from './assignment-store.js'
import type { RelayDatabase, RelayLockOptions, SqlRow } from './database.js'
import { openInMemoryRelayDatabase } from './database.js'
import { RelayAssignmentStore } from '../assignment-store.js'
import type { RelayDatabase, RelayLockOptions, SqlRow } from '../database.js'
import { openInMemoryRelayDatabase } from '../database.js'
const identity = { userId: 'user-a', relayHostId: 'host000000000001' }
const activityId = 'splice:connection-1'
+3 -3
View File
@@ -20732,13 +20732,13 @@
"invariant": "A single-cell capacity check reads only that cell while retaining snapshot freshness, incarnation, outstanding reservation and missing-limit policy; new placement retains the full fleet inventory.",
"oracle": "With 32 capped cells, an existing active host stays on its pinned cell and reads one headroom row; new placement reads all 32. Missing, expired or prior-incarnation snapshots, capacity exhaustion and outstanding debt still refuse the active pinned host; an uncapped cell remains admissible.",
"commands": [
"ORCA_BACKGROUND_LAUNCH=1 pnpm --dir cloud/apps/relay exec vitest run ../../../cloud/apps/relay/src/assignment/assignment-headroom-scope.test.ts ../../../cloud/apps/relay/src/assignment/assignment-connection-headroom.test.ts ../../../cloud/apps/relay/src/assignment-store.test.ts ../../../cloud/apps/relay/src/assignment-store-lock-order.test.ts ../../../cloud/apps/relay/src/cell-inventory-lock-contention.test.ts ../../../cloud/apps/relay/src/assignment-isolated-cell-replacement.test.ts ../../../cloud/apps/relay/src/regional-rehome-target-selection.test.ts --silent=false"
"ORCA_BACKGROUND_LAUNCH=1 pnpm --dir cloud/apps/relay exec vitest run ../../../cloud/apps/relay/src/assignment/assignment-headroom-scope.test.ts ../../../cloud/apps/relay/src/assignment/assignment-connection-headroom.test.ts ../../../cloud/apps/relay/src/assignment-store.test.ts ../../../cloud/apps/relay/src/assignment/assignment-store-lock-order.test.ts ../../../cloud/apps/relay/src/cell-inventory-lock-contention.test.ts ../../../cloud/apps/relay/src/assignment-isolated-cell-replacement.test.ts ../../../cloud/apps/relay/src/regional-rehome-target-selection.test.ts --silent=false"
],
"testFiles": [
"cloud/apps/relay/src/assignment/assignment-headroom-scope.test.ts",
"cloud/apps/relay/src/assignment/assignment-connection-headroom.test.ts",
"cloud/apps/relay/src/assignment-store.test.ts",
"cloud/apps/relay/src/assignment-store-lock-order.test.ts",
"cloud/apps/relay/src/assignment/assignment-store-lock-order.test.ts",
"cloud/apps/relay/src/cell-inventory-lock-contention.test.ts",
"cloud/apps/relay/src/assignment-isolated-cell-replacement.test.ts",
"cloud/apps/relay/src/regional-rehome-target-selection.test.ts"
@@ -20760,7 +20760,7 @@
"date": "2026-09-25",
"runner": "local",
"platform": "macos",
"command": "ORCA_BACKGROUND_LAUNCH=1 pnpm --dir cloud/apps/relay exec vitest run ../../../cloud/apps/relay/src/assignment/assignment-headroom-scope.test.ts ../../../cloud/apps/relay/src/assignment/assignment-connection-headroom.test.ts ../../../cloud/apps/relay/src/assignment-store.test.ts ../../../cloud/apps/relay/src/assignment-store-lock-order.test.ts ../../../cloud/apps/relay/src/cell-inventory-lock-contention.test.ts ../../../cloud/apps/relay/src/assignment-isolated-cell-replacement.test.ts ../../../cloud/apps/relay/src/regional-rehome-target-selection.test.ts --silent=false",
"command": "ORCA_BACKGROUND_LAUNCH=1 pnpm --dir cloud/apps/relay exec vitest run ../../../cloud/apps/relay/src/assignment/assignment-headroom-scope.test.ts ../../../cloud/apps/relay/src/assignment/assignment-connection-headroom.test.ts ../../../cloud/apps/relay/src/assignment-store.test.ts ../../../cloud/apps/relay/src/assignment/assignment-store-lock-order.test.ts ../../../cloud/apps/relay/src/cell-inventory-lock-contention.test.ts ../../../cloud/apps/relay/src/assignment-isolated-cell-replacement.test.ts ../../../cloud/apps/relay/src/regional-rehome-target-selection.test.ts --silent=false",
"result": "passed",
"durationSeconds": 0.513,
"summary": "189 tests across seven files passed; independent root rerun also passed189 tests. Relay typecheck passed separately."