test_runtime

Function test_runtime 

Source
pub fn test_runtime() -> Runtime
Expand description

Returns a process-wide Runtime suitable for tests that need to construct a Table outside a tokio context.

The returned Runtime wraps a single shared multi-thread tokio runtime that is lazily built on first call and lives until process exit. Cloning is cheap, so test code can call this every time it needs a runtime to feed into TableBuilder::runtime.