Files
ZyyandCodex fada9bc0bd refactor: clarify module boundaries and naming
Organize backend modules by responsibility, simplify runtime layers, and
keep shared contracts with their owning modules. Split frontend account
APIs and separate shared types from request implementations.

Strengthen architecture checks for module dependencies and test layout.

Co-authored-by: Codex <noreply@openai.com>
2026-11-01 20:35:59 +08:00

28 lines
898 B
Rust

//! 验证运行时整体关闭回收当前代次并拒绝新候选
use gateway_core::routing::ConfigRevision;
use gateway_core::routing::extensions::ExtensionPreparationPort;
#[tokio::test]
async fn runtime_shutdown_reaps_live_generation_and_rejects_late_preparation() {
let (cache, store, runtime) = super::setup().await;
let published = ExtensionPreparationPort::prepare(&runtime, ConfigRevision::new(1).unwrap())
.await
.unwrap();
assert!(published.is_ready());
assert_eq!(std::fs::read_dir(cache.path()).unwrap().count(), 1);
runtime.shutdown().await;
assert!(!published.is_ready());
super::wait_until_empty(cache.path()).await;
assert!(
ExtensionPreparationPort::prepare(&runtime, ConfigRevision::new(1).unwrap())
.await
.is_err()
);
runtime.shutdown().await;
drop(published);
drop(store);
}