test: slim gateway startup helpers and configure nextest

This commit is contained in:
AAEE86
2026-09-24 10:13:01 +08:00
parent 27ae884759
commit 926f5cc928
11 changed files with 134 additions and 130 deletions
@@ -59,21 +59,11 @@ where
F: FnOnce() -> Fut + Send + 'static,
Fut: std::future::Future<Output = ()> + 'static,
{
let handle = std::thread::Builder::new()
.name(test_name.to_string())
.stack_size(PROVIDER_QUOTA_TEST_STACK_BYTES)
.spawn(move || {
let runtime = tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
.expect("test runtime should build");
runtime.block_on(make_future());
})
.expect("provider quota test thread should spawn");
if let Err(payload) = handle.join() {
std::panic::resume_unwind(payload);
}
crate::tests::run_async_test_on_large_stack(
test_name,
PROVIDER_QUOTA_TEST_STACK_BYTES,
make_future,
);
}
#[tokio::test]