Starts a runtime and returns a [`TestServerWithRuntime`].
(self)
| 278 | |
| 279 | /// Starts a runtime and returns a [`TestServerWithRuntime`]. |
| 280 | pub fn start_blocking(self) -> TestServerWithRuntime { |
| 281 | let runtime = tokio::runtime::Builder::new_multi_thread() |
| 282 | .enable_all() |
| 283 | .thread_stack_size(mz_ore::stack::STACK_SIZE) |
| 284 | .build() |
| 285 | .expect("failed to spawn runtime for test"); |
| 286 | let runtime = Arc::new(runtime); |
| 287 | let server = runtime.block_on(self.start()); |
| 288 | TestServerWithRuntime { runtime, server } |
| 289 | } |
| 290 | |
| 291 | pub fn data_directory(mut self, data_directory: impl Into<PathBuf>) -> Self { |
| 292 | self.data_directory = Some(data_directory.into()); |
no test coverage detected