feat(runtime): U07 生命周期装配 + stub 装配冒烟(ACM2-10 U07/U01 遗留)

- PipelineLifecycle:ServerStartupEvent 后在专用单线程(msgx-pump/msgx-dispatcher,daemon)
  拉起 Pump/Dispatcher 循环;停机 requestStop+interrupt+join;@Requires(msgx.pipeline.autostart=true)
- PipelineProps.pipeline.autostart(默认 false,生产/测试默认不自动起循环,防泄漏线程)
- stub 装配(infra/stub,@Requires(msgx.stubs=true)):7 仓储内存实装 + StubXmlCodec(未实装
  → CODEC_ERROR 走 FAILED 可重放路径)+ StubRedis + StubDeliveryPort + Holder Factory
- 配置:application-dev.yml(stubs+autostart,/env、/beans 放开,无需 DB 即可 dev 跑通);
  application-test.yml(stubs=true、autostart=false);README 补 dev stub 运行说明
- PipelineSmokeTest(4):等价 /beans 装配核验 + 收报→主泵领取→FAILED(CODEC_ERROR) + U11 重放
  回 PENDING + Dispatcher flush 聚合(stub 用例前清内存状态防上下文复用串扰)
- 全量测试 34 个通过
This commit is contained in:
windyboy
2026-09-06 20:53:14 +08:00
parent 73113779d2
commit f6da0cb782
11 changed files with 518 additions and 7 deletions
+9 -4
View File
@@ -1,6 +1,14 @@
# U03 配置绑定回归测试专用环境(@MicronautTest 默认 environment=test
# 目的:让 ApplicationContext 可无外部依赖启动(内存 datasource / 关闭迁移 / 关闭注册),
# 以便以「注入 PipelineProps 断言」离线验证 msgx.* 嵌套键绑定(N02 验收),不依赖 /env 端点。
# 以便以「注入 PipelineProps/DataSource 断言」离线验证绑定(N02/R09/R01a),不依赖 /env 端点。
# U07stubs=true 提供内存仓储使全链路(Controller→Inbox→Pump→Dispatcher)可装配;
# autostart=false:测试内不自动拉起后台循环(避免泄漏线程),按需手动 tick。
msgx:
register-eureka: false
stubs: true
pipeline:
autostart: false
datasources:
default:
url: jdbc:h2:mem:cfgtest;DB_CLOSE_DELAY=-1
@@ -20,9 +28,6 @@ kafka:
bootstrap:
servers: 127.0.0.1:9092
msgx:
register-eureka: false
micronaut:
server:
port: 0