MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / test_runtime_with_resume

Function test_runtime_with_resume

crates/openshell-server/src/compute/mod.rs:2347–2368  ·  view source on GitHub ↗
(
        driver: SharedComputeDriver,
        startup_resume: Option<Arc<dyn StartupResume>>,
    )

Source from the content-addressed store, hash-verified

2345 }
2346
2347 async fn test_runtime_with_resume(
2348 driver: SharedComputeDriver,
2349 startup_resume: Option<Arc<dyn StartupResume>>,
2350 ) -> ComputeRuntime {
2351 let store = Arc::new(Store::connect("sqlite::memory:").await.unwrap());
2352 ComputeRuntime {
2353 driver,
2354 driver_name: "test-driver".to_string(),
2355 shutdown_cleanup: None,
2356 startup_resume,
2357 _driver_process: None,
2358 default_image: "openshell/sandbox:test".to_string(),
2359 store,
2360 sandbox_index: SandboxIndex::new(),
2361 sandbox_watch_bus: SandboxWatchBus::new(),
2362 tracing_log_bus: TracingLogBus::new(),
2363 supervisor_sessions: Arc::new(SupervisorSessionRegistry::new()),
2364 sync_lock: Arc::new(Mutex::new(())),
2365 gateway_bind_addresses: Vec::new(),
2366 replica_id: "test-replica".to_string(),
2367 }
2368 }
2369
2370 fn register_test_supervisor_session(runtime: &ComputeRuntime, sandbox_id: &str) {
2371 let (tx, _rx) = mpsc::channel(1);

Calls 1

connectFunction · 0.85

Tested by

no test coverage detected