mirror of
https://github.com/stablyai/orca.git
synced 2026-11-13 09:27:29 +00:00
refactor(cloud): group relay assignment locking tests (#36671)
This commit is contained in:
+2
-2
@@ -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
|
||||
+2
-2
@@ -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
|
||||
+3
-3
@@ -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'
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user