MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / start_blocking

Method start_blocking

src/environmentd/src/test_util.rs:280–289  ·  view source on GitHub ↗

Starts a runtime and returns a [`TestServerWithRuntime`].

(self)

Source from the content-addressed store, hash-verified

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());

Calls 3

expectMethod · 0.80
buildMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected