test(migration): 带数据 V1.1→最新升级链验证 + DELY Apply 拒绝 (ACM2-29 P2-4)
- FlywayMigrationTest 新增升级链用例:隔离 schema 迁至 V1.1.0、写入含 *_TXT 的存量行、一路升级到最新——断言标量数据存活、v2 追踪列默认就位、 display 视图/backfill_todo/明细表可用、*_TXT 列按已知损失边界消失(评审 F6: 升级前必须导出或重放,测试固化该边界) - L2 收尾:DELY 无协议序号属性(DLNO 非法)——SEQ_ATTR 移除 DELY,Apply 对 DELY fail fast 拒绝(语义矩阵 §2 同步口径) - 级联回归已在 P2-2 落地(deleteByFlids/deleteDiffByDay 明细级联断言) 验证:MSGX_PG_PORT=5433 真实 PG 全量 107 用例 0 失败 0 跳过
This commit is contained in:
@@ -143,6 +143,29 @@ class FlightStateEngineTest {
|
||||
assertEquals(emptyList<Map<String, String>>(), next.collections["GTDT"])
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `apply on DELY fails fast because protocol defines no sequence attribute`() {
|
||||
val current = FlightNextState(
|
||||
"F1",
|
||||
emptyMap(),
|
||||
mapOf("DELY" to listOf(mapOf("CODE" to "YY"))),
|
||||
1L,
|
||||
"m1",
|
||||
)
|
||||
val error = runCatching {
|
||||
FlightStateEngine.apply(
|
||||
current,
|
||||
FlightFieldCommands(
|
||||
"F1",
|
||||
collections = mapOf("DELY" to CollectionCommand.Apply(mapOf("CODE" to "ZZ"), "1")),
|
||||
),
|
||||
"m2",
|
||||
bumpVersion = true,
|
||||
)
|
||||
}.exceptionOrNull()
|
||||
assertTrue(error is IllegalArgumentException)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `exception null payload translates to explicit clear and apply records cleared key`() {
|
||||
val current = FlightNextState(
|
||||
|
||||
Reference in New Issue
Block a user