1
0
Fork 0
mirror of https://github.com/containers/youki synced 2024-05-10 09:36:13 +02:00

change duration back to u64

This commit is contained in:
yihuaf 2021-10-06 18:41:15 +02:00
parent b70929cb8c
commit bd21ba9001
4 changed files with 7 additions and 7 deletions

2
Cargo.lock generated
View File

@ -901,7 +901,7 @@ dependencies = [
[[package]]
name = "oci-spec"
version = "0.5.2"
source = "git+https://github.com/containers/oci-spec-rs?rev=19c26ca7dc04ece2ea934222a55afa0ead53aa88#19c26ca7dc04ece2ea934222a55afa0ead53aa88"
source = "git+https://github.com/containers/oci-spec-rs?rev=3d5132a18c305be59d58187201429d8f0243b513#3d5132a18c305be59d58187201429d8f0243b513"
dependencies = [
"derive_builder",
"getset",

View File

@ -38,7 +38,7 @@ mio = { version = "0.7.13", features = ["os-ext", "os-poll"] }
chrono = { version="0.4", features = ["serde"] }
once_cell = "1.6.0"
futures = { version = "0.3", features = ["thread-pool"] }
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "19c26ca7dc04ece2ea934222a55afa0ead53aa88" }
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "3d5132a18c305be59d58187201429d8f0243b513" }
cgroups = { version = "0.1.0", path = "./cgroups" }
systemd = { version = "0.8", default-features = false, optional = true }
dbus = "0.9.2"
@ -50,7 +50,7 @@ pentacle = "1.0.0"
path-clean = "0.1.0"
[dev-dependencies]
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "19c26ca7dc04ece2ea934222a55afa0ead53aa88", features = ["proptests"] }
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "3d5132a18c305be59d58187201429d8f0243b513", features = ["proptests"] }
quickcheck = "1"
serial_test = "0.5.1"
ipc-channel = "0.15.0"

View File

@ -14,7 +14,7 @@ nix = "0.22.0"
procfs = "0.10.1"
log = "0.4"
anyhow = "1.0"
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "19c26ca7dc04ece2ea934222a55afa0ead53aa88" }
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "3d5132a18c305be59d58187201429d8f0243b513" }
systemd = { version = "0.8", default-features = false, optional = true }
dbus = "0.9.2"
serde = { version = "1.0", features = ["derive"] }
@ -24,7 +24,7 @@ errno = { version = "0.2.7", optional = true }
libc = { version = "0.2.84", optional = true }
[dev-dependencies]
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "19c26ca7dc04ece2ea934222a55afa0ead53aa88", features = ["proptests"] }
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "3d5132a18c305be59d58187201429d8f0243b513", features = ["proptests"] }
quickcheck = "1"
clap = "2"
serde = { version = "1.0", features = ["derive"] }

View File

@ -94,7 +94,7 @@ pub fn run_hooks(hooks: Option<&Vec<Hook>>, container: Option<&Container>) -> Re
let res = hook_process.wait();
let _ = s.send(res);
});
match r.recv_timeout(time::Duration::from_secs(timeout_sec.as_secs())) {
match r.recv_timeout(time::Duration::from_secs(timeout_sec as u64)) {
Ok(res) => res,
Err(crossbeam_channel::RecvTimeoutError::Timeout) => {
// Kill the process. There is no need to further clean
@ -214,7 +214,7 @@ mod test {
String::from("-f"),
String::from("/dev/null"),
])
.timeout(Duration::from_secs(1))
.timeout(1)
.build()?;
let hooks = Some(vec![hook]);
match run_hooks(hooks.as_ref(), Some(&default_container)) {