[router] Implement HTTP Dependency Injection Pattern for Router System (#8714)
This commit is contained in:
@@ -53,10 +53,12 @@ impl TestContext {
|
||||
|
||||
config.mode = RoutingMode::Regular { worker_urls };
|
||||
|
||||
let router = tokio::task::spawn_blocking(move || RouterFactory::create_router(&config))
|
||||
.await
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
let app_context = common::create_test_context(config);
|
||||
let router =
|
||||
tokio::task::spawn_blocking(move || RouterFactory::create_router(&app_context))
|
||||
.await
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
let router = Arc::from(router);
|
||||
|
||||
if !workers.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user