MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / persistent_root_lock_rejects_second_server_open

Function persistent_root_lock_rejects_second_server_open

tests/runtime_smoke.rs:666–676  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

664
665#[test]
666fn persistent_root_lock_rejects_second_server_open() -> anyhow::Result<()> {
667 let root = tempfile::TempDir::new()?;
668 let server = PgliteServer::builder().path(root.path()).start()?;
669 let err = match PgliteServer::builder().path(root.path()).start() {
670 Ok(_) => anyhow::bail!("second server must fail while the root lock is held"),
671 Err(err) => err,
672 };
673 assert!(format!("{err:#}").contains("PGlite root is already in use"));
674 server.shutdown()?;
675 Ok(())
676}
677
678#[test]
679fn persistent_root_lock_rejects_direct_open_while_server_runs() -> anyhow::Result<()> {

Callers

nothing calls this directly

Calls 3

startMethod · 0.45
pathMethod · 0.45
shutdownMethod · 0.45

Tested by

no test coverage detected