mirror of
https://github.com/denoland/deno.git
synced 2025-01-05 05:49:20 -05:00
ignore PoisonError in test_server (#6567)
This commit is contained in:
parent
f5242f333e
commit
a19d6a2613
1 changed files with 7 additions and 1 deletions
|
@ -78,7 +78,13 @@ impl<'a> Drop for HttpServerGuard<'a> {
|
||||||
/// will be killed.
|
/// will be killed.
|
||||||
pub fn http_server<'a>() -> HttpServerGuard<'a> {
|
pub fn http_server<'a>() -> HttpServerGuard<'a> {
|
||||||
// TODO(bartlomieju) Allow tests to use the http server in parallel.
|
// TODO(bartlomieju) Allow tests to use the http server in parallel.
|
||||||
let g = GUARD.lock().unwrap();
|
let r = GUARD.lock();
|
||||||
|
let g = if let Err(poison_err) = r {
|
||||||
|
// If panics happened, ignore it. This is for tests.
|
||||||
|
poison_err.into_inner()
|
||||||
|
} else {
|
||||||
|
r.unwrap()
|
||||||
|
};
|
||||||
|
|
||||||
println!("tools/http_server.py starting...");
|
println!("tools/http_server.py starting...");
|
||||||
let mut child = Command::new("python")
|
let mut child = Command::new("python")
|
||||||
|
|
Loading…
Reference in a new issue