mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 08:02:28 +00:00
Phase 6 of the relay split: the relay's deploy/operate surface moves under cloud/ with 24 cloud-* workflows gated on ORCA_CLOUD_OPERATIONS_ENABLED, the Cloud SQL rollout lease action, the relay Terraform root (dual-accept identities for both repositories), scripts, docs, CODEOWNERS, and a terraform validate job in Cloud Verify.
19 lines
701 B
TypeScript
19 lines
701 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { isRelayDatabaseTransientError } from './database.js'
|
|
|
|
describe('relay database transient errors', () => {
|
|
it.each(['40P01', '40001', '55P03', '57014', '53300', '57P03', '08001', '08006'])(
|
|
'classifies PostgreSQL code %s as retryable overload',
|
|
(code) => {
|
|
expect(isRelayDatabaseTransientError({ code })).toBe(true)
|
|
}
|
|
)
|
|
|
|
it('classifies pool acquisition timeout without hiding programming failures', () => {
|
|
expect(
|
|
isRelayDatabaseTransientError(new Error('timeout exceeded when trying to connect'))
|
|
).toBe(true)
|
|
expect(isRelayDatabaseTransientError(new TypeError('broken invariant'))).toBe(false)
|
|
})
|
|
})
|