feat: add retention policy and stability verification

This commit is contained in:
2026-09-22 16:19:21 +08:00
parent c33c12c5e9
commit 2f95d9c45c
30 changed files with 1633 additions and 18 deletions

19
scripts/test-stability.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
# P1 生产稳定性定向回归:真实 MySQL 锁等待/死锁、保留期磁盘增长,
# 以及两个独立 Orbit 进程之间的重连风暴和慢消费者。
set -eu
TASK_GO=${GO:-go}
if [ -z "${ORBIT_TEST_MYSQL_DSN:-}" ]; then
printf '%s\n' 'ORBIT_TEST_MYSQL_DSN must point to a disposable MySQL 8.4 database.' >&2
exit 2
fi
"$TASK_GO" test -race -count=1 -run 'TestIntegration(WithTxRetriesPreCommitDeadlock|RetentionPolicyIsSharedAuditedAndIdempotent|RetentionDiskGrowthAndPreview|FairDispatchApplicationIsolation|WorkflowVersionAndRaces)$' ./internal/storage/mysql
if [ -z "${ORBIT_TEST_SERVER_BINARY:-}" ] || [ -z "${ORBIT_TEST_WORKER_URL:-}" ] || [ -z "${ORBIT_TEST_WORKER_CREDENTIALS_FILE:-}" ]; then
printf '%s\n' 'ORBIT_TEST_SERVER_BINARY, ORBIT_TEST_WORKER_URL and ORBIT_TEST_WORKER_CREDENTIALS_FILE are required for the cross-node WebSocket checks.' >&2
exit 2
fi
(cd sdk/go && "$TASK_GO" test -race -count=1 -run 'TestIntegrationEventProcess(SlowConsumerPeerProgress|CrossNodeReconnectStorm)$' -v .)